Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Eval and block problems
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Robert Klemme, post: 4485938"] They are not really too complicated IMHO: instance_eval is a variant of eval that allows a string and a block and just rebinds "self" before evaluating the string / block. class_eval is an extension of instance_eval which makes sure that any "def"'s do not apply to the instance itself but to all instances of the class. eval is the basic method that accepts only a string but can work with any binding. Kind regards robert [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Eval and block problems
Top