There seems to be an issue either with how block-local variables are
stored or how eval'ed code looks them up. The following fails because
x is treated as a local variable, rather than a dyn variable, and so
the interpreter tries to find it in the block's containing scope,
rather than in its dyn var list:

def foo
  yield
end

foo { x = "bar"; eval("puts x") }

Obviously this should work. Is it an issue that the parser doesn't
know how to treat the reference to x, and so tries to look it up as a
local var rather than a dvar?

This is the current stopper for Rails' generate script.

--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to