#383: segmentation fault with: NSDictionary.dictionaryWithObjectsAndKeys
----------------------------+-----------------------------------------------
Reporter: jazz...@… | Owner: lsansone...@…
Type: defect | Status: closed
Priority: critical | Milestone: MacRuby 0.5
Component: MacRuby | Resolution: invalid
Keywords: |
----------------------------+-----------------------------------------------
Changes (by lsansone...@…):
* status: new => closed
* resolution: => invalid
Old description:
> {{{
> macruby -e 'p NSDictionary.dictionaryWithObjectsAndKeys("a","b",nil)'
> Segmentation fault
> }}}
New description:
{{{
macruby -e 'p NSDictionary.dictionaryWithObjectsAndKeys("a","b",nil)'
Segmentation fault
}}}
--
Comment:
-[NSDictionary dictionaryWithObjectsAndKeys:] is a tricky variadic method
(it accepts a variable number of arguments). There is no way MacRuby can
know if a given method is variadic by asking the runtime.
However, MacRuby can handle these methods if you load the appropriate
framework metadata first.
{{{
$ macruby -e 'framework "Foundation"; p
NSDictionary.dictionaryWithObjectsAndKeys("a","b",nil)'
{"b"=>"a"}
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/383#comment:1>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel