[MacRuby] #1139: MacRuby inconsistent compared to CRuby when breaking from hash enumeration
#1139: MacRuby inconsistent compared to CRuby when breaking from hash enumeration ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- When I iterate over a hash in CRuby and `break` during one iteration the iteration will return value to be nil. If I try the same thing in MacRuby I will get the same return value that I would have gotten had the iteration finished. I found this problem with Hash objects, an Array has the same behaviour in this case on CRuby and MacRuby. With the CRuby irb: ruby-1.9.2-p136 :001 > { test:'pair' }.each_pair { |key,value| break } => nil ruby-1.9.2-p136 :002 > { test:'pair' }.each_pair { |key,value| key } => {:test=>"pair"} ruby-1.9.2-p136 :003 > With the MacRuby irb: irb(main):001:0> { test:'pair' }.each_pair { |key,value| break } => {:test=>"pair"} irb(main):002:0> { test:'pair' }.each_pair { |key,value| key } => {:test=>"pair"} irb(main):003:0> -- Ticket URL: <http://www.macruby.org/trac/ticket/1139> MacRuby <http://macruby.org/>
#1139: MacRuby inconsistent compared to CRuby when breaking from hash enumeration ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: https://github.com/MacRuby/MacRuby/commit/5db2bcda9e7fbf63424959a40b773e9e96... -- Ticket URL: <http://www.macruby.org/trac/ticket/1139#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby