#304: in irb: defining a local variable in a method doesn´t work
------------------------+---------------------------------------------------
Reporter: d...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: minor | Milestone: MacRuby 0.5
Component: MacRuby | Keywords: irb
------------------------+---------------------------------------------------
in irb
{{{
irb(main):009:0> def test; a = 42; p a; end; test
}}}
produces
{{{
NameError: undefined local variable or method `:a' for main:TopLevel
from 0:in `test'
from 0:in `eval:'
from 0:in `evaluate:'
from 0:in `evaluate:'
from 0:in `signal_status:'
from 0:in `class_eval:'
from 0:in `each_top_level_statement'
from 0:in `eval_input'
from 0:in `start:'
}}}
macruby:
{{{
macruby -e "def test; a = 42; p a; end; test"
}}}
works fine
--
Ticket URL: <http://www.macruby.org/trac/ticket/304>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel