From: Jeff Mitchell Date: 2004-05-29T13:01:29+09:00 Subject: Re: Calling global method --- Sean O'Dell wrote: > > def method > end > > ...I expect that to be a global. It looks global. > > It would be better if either you simply weren't allowed to do that, and you > were FORCED to specify a module or class before definining any methods, such > as Java does, or the methods are simply placed into Kernel by default, making > them global. To me, it's completely unexpected that such a small bit of code > such as the above would be so hard to call from within other module methods. Without getting into whether this is good, bad, indifferent, or Just Ruby, I must say that I found it quite strange. Most would naturally expect the top level to behave as if you were in some top-level module. But it's a completely different beast. The fact that you are in an *instance* of Object is the strange part. Could someone give a good reason why the top level is an instance of Object rather than a module with "extend self"? __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/