[MacRuby-devel] macruby or macirb bug

Laurent Sansonetti lsansonetti at apple.com
Fri Nov 28 21:35:40 PST 2008


Hi Tim,

On Nov 28, 2008, at 8:54 PM, Tim Rand wrote:

> In macirb the following code crashes
>
> >> array = NSMutableArray.arrayWithObjects([1,2])
> => [[1, 2], 1511869]
> >> array
> => [[1, 2], 1511869]
> >> array.length
> => 2
> >> array2 = NSMutableArray.arrayWithObjects([1, 2, "this"])
> Killed

These special methods (accepting C arrays of elements) are not  
supported yet. All the necessary annotations are present in the  
BridgeSupport metadata files and I just need to implement them, as we  
did in RubyCocoa.

In the meantime you might have to use the "safe" alternatives, such as  
-[NSArray arrayWithArray:].

If you want to track this issue please file a bug :-)

Laurent



More information about the MacRuby-devel mailing list