#401: Cannot call from ObjC to Ruby with an int argument
-------------------------------------+--------------------------------------
Reporter: antony.bla...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: critical | Milestone: MacRuby 0.5
Component: MacRuby | Keywords:
-------------------------------------+--------------------------------------
0.5b1 / 10.6.1
Given this Obj-C trampoline (with corresponding header):
{{{
@implementation CallInDriver
+(id) test:(id)rubyObject {
return [rubyObject callWithInt:1];
}
@end
}}}
and this Ruby that uses it:
{{{
class Test
def callWithInt(i)
nil
end
end
CallInDriver.test(Test.new)
}}}
you get:
{{{
Program received signal: “EXC_BAD_ACCESS".
}}}
Changing the ObjC call to:
{{{
return [rubyObject callWithInt:[NSNumber numberWithInt: 1]];
}}}
doesn't have the problem (as you would expect). I presume this is meant to
work?
--
Ticket URL: <http://www.macruby.org/trac/ticket/401>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel