From: Shashank Date Date: 2003-06-25T22:21:52+09:00 Subject: Re: Another Run Time Evaluation Q: "daz" wrote in message [snip] > printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM) > #d='I refuse to uncomment this' > eval('d=10') > p d rescue eval('d+1') > > eval('d=12') > p d rescue eval('d+1', TOPLEVEL_BINDING) > p d > > #-> ruby 1.7.3 (2002-11-17) [i386-mswin32] > #-> 11 > #-> 13 > #-> rb31D4.TMP:8: undefined local variable or method `d' > # for # (NameError) Did not work like this for me using 1.8.0 preview 2. I did not see 11 and 13 at all ... just the error for undefined local variable. :-(