[MacRuby] #1004: warnings when running macirb

MacRuby ruby-noreply at macosforge.org
Mon Nov 22 18:39:29 PST 2010


#1004: warnings when running macirb
--------------------------------+-------------------------------------------
 Reporter:  mhmstuff@…          |       Owner:  eloy.de.enige@…        
     Type:  defect              |      Status:  new                    
 Priority:  critical            |   Milestone:                         
Component:  MacRuby             |    Keywords:                         
--------------------------------+-------------------------------------------
Changes (by lsansonetti@…):

  * owner:  lsansonetti@… => eloy.de.enige@…


Comment:

 Problem is in lib/irb/source.rb, line 75.

 {{{
         @code_block = !parse.nil? && !@in_string && !@in_regexp &&
 !@in_array
 }}}

 These ivars have not been created yet, and if used in a conditional as is
 with warnings enabled, a warning will be raised. I verified with a similar
 snippet with MRI.

 {{{
 $ ruby -e 'foo=!@foo&&!@bar'
 $ ruby -w -e 'foo=!@foo&&!@bar'
 -e:1: warning: instance variable @foo not initialized
 -e:1: warning: instance variable @bar not initialized
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1004#comment:3>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list