just curious where can I find definition of methods method ?
irb> BasicObject.method(:methods).owner
=> Kernel
irb> BasicObject.ancestors
=> [BasicObject] # ?? it does not inherit from Kernel class ??
irb> BasicObject.method(:methods).source_location
=> nil
That looks inconsistent. Possible bug ?
ruby 1.9.3p327
Ok, that would explain ‘methods’ method really comes from Kernel but
what about its definition ? For example at http://www.ruby-doc.org/core-1.9.3/Kernel.html is not listed between
Kernel class methods.
It is probably just a bit confused because the method definition is
located in class.c, not object.c. I dunno tho.
Ok, that would explain ‘methods’ method really comes from Kernel but
what about its definition ? For example at http://www.ruby-doc.org/core-1.9.3/Kernel.html is not listed between
Kernel class methods.
Ok, that would explain ‘methods’ method really comes from Kernel but
what about its definition ? For example at http://www.ruby-doc.org/core-1.9.3/Kernel.html is not listed between
Kernel class methods.