From: MonkeeSage Date: 2007-11-26T15:20:01+09:00 Subject: Re: module_eval is an instance method? > Ok, how do you explain this output: > > def meth1 > Object.module_eval('num') > end > > num = 10 > Object.module_eval('num') > -->10 > > 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. $num = 10 def meth1 Object.module_eval('$num') end Regards, Jordan