where is instance_eval() defined?

7

7stud --

P

Phillip Gawlowski

Where in the hell is instance_eval() defined? =A0In "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
--=20
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.
 
S

Su Zhang

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);
 
7

7stud --

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top