[MacRuby-devel] [MacRuby] #304: in irb: defining a local variable in a method doesn´t work

MacRuby ruby-noreply at macosforge.org
Fri Sep 18 16:35:59 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                  
------------------------+---------------------------------------------------

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/>



More information about the MacRuby-devel mailing list