[MacRuby-devel] [MacRuby] #255: NSArray.new(["elem"]) segfaults
MacRuby
ruby-noreply at macosforge.org
Wed Aug 26 13:27:26 PDT 2009
#255: NSArray.new(["elem"]) segfaults
---------------------------------------+------------------------------------
Reporter: thilo@… | Owner: lsansonetti@…
Type: defect | Status: closed
Priority: major | Milestone: MacRuby 0.5
Component: MacRuby | Resolution: fixed
Keywords: NSArray constructor |
---------------------------------------+------------------------------------
Changes (by lsansonetti@…):
* status: new => closed
* resolution: => fixed
* milestone: => MacRuby 0.5
Comment:
Doesn't seem to crash anymore with trunk.
{{{
$ ./miniruby -e 'NSArray.new(["elem"])'
can't modify frozen/immutable array (RuntimeError)
}}}
The exception is because we will firstly allocate an NSArray instance then
#initialize will try to modify it, and it fails since the object is
immutable. Not sure if it's meaningful to fix that.
--
Ticket URL: <http://www.macruby.org/trac/ticket/255#comment:3>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list