From: Ben Lovell Date: 2009-04-17T21:16:30+09:00 Subject: Re: simple module method call question --001636c5a9ff620c860467bf2640 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Fri, Apr 17, 2009 at 1:00 PM, Tom Cloyd wrote: > > eval("Utils.orph_chk") <= I will be replacing the string with a > construction using a variable, in the final version > > This always fails. I've tried every trick I can think of, but always I get > this: > > ../lib/setnet/SN.rb:579:in `proc_command': undefined method `orph_chk' for > Utils:Module (NoMethodError) > from ../lib/setnet/SN.rb:229:in `eval' > from ../lib/setnet/SN.rb:579:in `proc_command' > from ../lib/setnet/SN.rb:229:in `user_interface' > from ../lib/setnet/SN.rb:146:in `manage' > from ../lib/setnet/SN.rb:68:in `startup' > from ./setnet:28 > > Can someone suggest why I'm not able to get to this method? > Any suggestions would be much appreciated. I cannot quite figure out what > to try next. > > Thanks, > > Tom > Hi, Why are you eval'ing this? This works: eval("include Utils; Utils.orph_chk") I would think it has something to do with your binding when you eval. Ben --001636c5a9ff620c860467bf2640--