[MacRuby] #304: in irb: defining a local variable in a method doesn´t work
#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/>
#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 ------------------------+--------------------------------------------------- Comment(by mattaimonetti@…): confirmed with trunk built on August 6. Probably a binding issue. -- Ticket URL: <http://www.macruby.org/trac/ticket/304#comment:1> MacRuby <http://macruby.org/>
#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 ------------------------+--------------------------------------------------- Comment(by lsansonetti@…): {{{ $ ./miniruby -e "eval('def test; a=42; p a; end'); test" (eval):1:in `test': undefined local variable or method `a' for main:TopLevel (NameError) -e:1:in `<main>' }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/304#comment:2> MacRuby <http://macruby.org/>
#304: in irb: defining a local variable in a method doesn´t work ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: irb | ------------------------+--------------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed Comment: Should be fixed in r2574. -- Ticket URL: <http://www.macruby.org/trac/ticket/304#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby