------ art_20945_14888295.1204249547777 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, On Fri, Feb 29, 2008 at 12:11 PM, Arlen Cuss <celtic / sairyx.org> wrote: > The reason for that is since the top level namespace *is* an Object. > Just to clarify everything else, this is the reason why they're available on every object. `Functions' defined on the top-level are actually *instance methods of Kernel*. This means that they're *included* as instance methods of Object, and hence of *every* object. Since Kernel is itself an Object, and it has a metaclass which is by all means an Object, this means you can even access them on Kernel as if they were module methods. Or any other object. >> def hi >> puts "hi!" >> end nil >> (class << Kernel;self;end).hi hi! nil >> Kernel.hi hi! nil >> hi hi! nil >> 42.hi hi! nil >> Arlen ------ art_20945_14888295.1204249547777--