Where is instance_eval() defined?

Where in the hell is instance_eval() defined? In "The Ruby Programming
Language", it says it's defined in Object, but the 1.9.2 docs don't list
it in Object:

http://www.ruby-doc.org/core/classes/Object.html

Nor is it listed in BasicObjec, Kernel, Module, or Class:

http://www.ruby-doc.org/core-1.9/classes/BasicObject.html
http://www.ruby-doc.org/core/classes/Kernel.html
http://ruby-doc.org/core/classes/Module.html
http://www.ruby-doc.org/core/classes/Class.html

···

--
Posted via http://www.ruby-forum.com/.

Where in the hell is instance_eval() defined? In "The Ruby Programming
Language", it says it's defined in Object, but the 1.9.2 docs don't list
it in Object:

irb --simple-prompt

···

On Wed, May 18, 2011 at 11:10 PM, 7stud -- <bbxx789_05ss@yahoo.com> wrote:

require "pp"
pp Object.methods.sort

--
Phillip Gawlowski

Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.

7stud -- wrote in post #999537:

Nor is it listed in BasicObjec

p RUBY_VERSION # => "1.9.2"
p BasicObject.public_instance_methods.grep(/eval/) # => [:instance_eval]

and in vm_eval.c:

rb_define_method(rb_cBasicObject, "instance_eval", rb_obj_instance_eval,
-1);

···

--
Posted via http://www.ruby-forum.com/\.

Thanks. Does anyone want to fix that in the 1.9.2 docs?

Also, I can never find the methods() method anywhere. Module?
BasicObject?

···

--
Posted via http://www.ruby-forum.com/.

In future do this:

    method(:instance_eval).owner #=> BasicObject

···

--
Posted via http://www.ruby-forum.com/.