From: Day Date: 2008-02-05T07:35:29+09:00 Subject: Re: eval vs. class_eval ------=_Part_9353_19277815.1202164537134 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Feb 4, 2008 4:16 PM, Thomas Wieczorek wrote: > eval and class_eval work on different scopes. eval works just in its > current scope(here your method), however class_eval works for the > whole class(your Fil) Are you saying there's some kind of weird scope shift up? If you run version two (with eval) and create a child class and a grandchild class, it looks like it creates the grandchild within Fil, not within Fil's child. The class_eval version creates it so that Fil's child is within Fil and Fil's grandchild is within Fil's child. At least... that's what's baffling to ME about this. Maybe Carl can provide an example. If I'm guessing totally wrong, what's going on, exactly, with the scope here? Ben ------=_Part_9353_19277815.1202164537134--