Where is instance_eval defined in Ruby 1.9.2?

523 Views Asked by At

Forgive my ignorance, but I must be missing something here. I can find the documentation for instance_eval for ruby 1.8.7 in the Object class, but I just cannot find it anywhere for 1.9.2. I know the functionality is still supported since I'm using it. Is there some secret parent class that it has been moved to?

1

There are 1 best solutions below

2
On

If you do Object.superclass you will see that that is BasicObject which itself has no superclass. Using BasicObject.public_methods reveals that instance_eval is defined there.

There does not seem to be any documentation for the methods on BasicObject.