From: 7stud -- Date: 2007-11-26T17:36:52+09:00 Subject: Re: module_eval is an instance method? Jordan Callicoat wrote: >> meth1 >> --> >> `module_eval': undefined local variable or method `num' for Object:Class >> (NameError) > > num is not in the scope of meth1 or of the Object class so resolution > fails. If you use a global variable it works fine. > It's not in the scope of the Object class? Then why does this work: num = 10 Object.module_eval('num') -->10 -- Posted via http://www.ruby-forum.com/.