From: ts Date: 2008-02-29T20:53:17+09:00 Subject: Re: constants defined in Kernel are also defined in Object? >>>>> "A" == Arlen Cuss writes: A> every object. `Functions' defined on the top-level are actually *instance A> methods of Kernel*. No, not really. a function at toplevel is a private method of Object. For example #inspect is defined in Kernel, and you can write vgs% ruby -e 'def inspect() puts "Object#inspect"; super end; p 12; 12.inspect' Object#inspect 12 -e:1:in `
'Object#inspect : private method `inspect' called for 12:Fixnum (NoMethodError) vgs% Guy Decoux