[MacRuby-devel] [MacRuby] #304: in irb: defining a local variable in a method doesn´t work
MacRuby
ruby-noreply at macosforge.org
Fri Aug 7 10:23:18 PDT 2009
#304: in irb: defining a local variable in a method doesn´t work
------------------------+---------------------------------------------------
Reporter: dev@… | Owner: lsansonetti@…
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/>
More information about the MacRuby-devel
mailing list