[MacRuby] #442: each_with_index fails for nested arrays
#442: each_with_index fails for nested arrays --------------------------------------+------------------------------------- Reporter: devin.chalmers@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: --------------------------------------+------------------------------------- each_with_index reports the wrong index for nested arrays. See attached example. -- Ticket URL: <http://www.macruby.org/trac/ticket/442> MacRuby <http://macruby.org/>
#442: each_with_index fails for nested arrays --------------------------------------+------------------------------------- Reporter: devin.chalmers@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------------+------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed Comment: I can't reproduce the bug as of r3060, so I assume it has been fixed. {{{ $ cat t.rb arrays = Array.new(3){|i| Array.new(3){|j| '%d-%d' % [i, j]}} arrays.each_with_index do |arr, i| arr.each_with_index do |elem, j| puts elem == '%d-%d' % [i, j] end end $ macruby t.rb true true true true true true true true true $ ruby19 t.rb true true true true true true true true true }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/442#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby