From: ts Date: 2006-05-13T01:09:47+09:00 Subject: Re: Making sense of the various Ruby "eval"s >>>>> "E" == Eli Bendersky writes: E> I'm struggling to fully understand the difference between the block and E> the string versions ? the string version is evil :-) E> OK I think I understand: instance_eval adds instance methods to a class, instance_eval add singleton methods, this is why you can use it with any objects (not only class, modules). E> and class/module_eval adds class methods to a class. But also no, add instance method for a class. This is why you can use it only with a class, module. E> instance_eval can be called on any object, but class_eval can't (it can E> be called only on class / module objects). Correct ? yes. Guy Decoux