[#1378] differences between Module and Class ? — Mathieu Bouchard <matju@...>

25 messages 2003/08/11
[#1387] Re: differences between Module and Class ? — matz@... (Yukihiro Matsumoto) 2003/08/12

Hi,

[#1442] Re: differences between Module and Class ? — Mathieu Bouchard <matju@...> 2003/08/21

[#1406] _id2ref bug? — Ryan Pavlik <rpav@...>

While debugging some caching code, I've come across a segfault related

22 messages 2003/08/14
[#1407] Re: _id2ref bug? — matz@... (Yukihiro Matsumoto) 2003/08/14

Hi,

[#1413] Re: _id2ref bug? (REPRODUCED, short) — Ryan Pavlik <rpav@...> 2003/08/14

On Fri, 15 Aug 2003 01:57:18 +0900

Re: I was doing pretty well until...

From: Hidetoshi NAGAI <nagai@...>
Date: 2003-08-06 04:33:06 UTC
List: ruby-core #1362
Hi, 

From: Dave Thomas <dave@pragprog.com>
Subject: I was doing pretty well until...
Date: Wed, 6 Aug 2003 12:37:28 +0900
Message-ID: <3F3077F4.8090203@pragprog.com>
> The reason? p_uid_change_privilege (copied below for your reading 
> pleasure).  I don't think I've ever seen this many 'if' statements 
> grouped together before :)

Please see [ruby-talk:76218].
The purpose of this method is "portable control of user-ID". 
To control the ID, many functions are impremented on the system. 
However, the functions depends on each system. Even if two sysytems 
have a same name function, effects are not always same. 
That is a trouble for portability of a script. 
Many 'if' satetements are to overcome the differnce. 
If you use the method, you can change to the new privilege and 
cannot back to the old one whatever system you use. 
If you fail it (include being able to back to the old), 
you will get an exception.
Each of other methods on Process::UID has same purpose. 
If you use only the methods on Process::UID/GID to control IDs, 
your script will have portability on any system running Ruby. 
-- 
                                  Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

In This Thread