[MacRuby] #1144: Exception not caught when trying to mutate an NSMutableArray during iteration
#1144: Exception not caught when trying to mutate an NSMutableArray during iteration ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- When I try to mutate an NSMutableArray while iterating over it, the Objective-C runtime will throw an exception which the MacRuby VM does not catch and propagate as a Ruby exception which causes MacRuby to segfault. The following example will cause MacRuby to segfault because of the problem mentioned above: numbers = NSMutableArray.alloc.init numbers.addObjectsFromArray [1, 2] numbers.each { |number| numbers << 10 unless number == 10 } See this thread for more details: http://lists.macosforge.org/pipermail /macruby-devel/2011-January/007034.html -- Ticket URL: <http://www.macruby.org/trac/ticket/1144> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby