From: Dave Thomas Date: 2001-01-16T09:10:02+09:00 Subject: [ruby-talk:9349] Re: Redefining singleton methods & C - function pointers "Christoph Rippel" writes: > p Kernel.singleton_methods.join " " > > produces a very long list - but I believe that these are only > ``ghost_singleton_methods'' (please, someone correct me if I am > wrong - one way or the other - ``ghost_methods'' are weird! ) > caused by the auto mixin of the Kernel module into Object, since > > p Kernel.private_instance_methods.join " " > > produces the same list. module Example def dave end module_function :dave end p Example.singleton_methods p Example.private_instance_methods #=> ["dave"] ["dave"] Same for Kernel. You can say Kernel.rand or (because Kernel is included in Object) rand Regards Dave