From: Roger Pack Date: 2008-07-09T13:49:27+09:00 Subject: Re: eval bug? > But is that still a bug in eval? > > Jabari My question is why does eval("b = 6") print b err and b = nil eval("b = 6") print b succeed? Eval has its own sub-scope? Note also that eval("b = 6", binding) print b also fails. Is this intended, or just a side-effect of the 'parse then execute' stratagem? Also as an interesting note, if you have code1 eval("code") code2 with 1.8.6, It appears to 'reparse' code2 after the eval has completed. I assume to make sure that it has accommodated for new variables or something. Except that you actually can't add new local variables, so it must be something else. Thanks. -R -- Posted via http://www.ruby-forum.com/.