[MacRuby-devel] Crash with NSUInteger in delegate method
Łukasz Adamczak
lukasz at czak.pl
Thu May 21 03:53:18 PDT 2009
My question boils down to a simpler case:
Ruby:
--------
class Dog
def bark(num = 1)
num.times { puts "woof!" }
end
end
Objective-C:
----------------
id dog = [[MacRuby sharedRuntime] evaluateString:@"Dog.new"];
[dog bark:3];
Passing Objective-C int to a Ruby method crashes it.
Assuming I don't have access to the Objective-C side (the caller) -
how do I make it work?
Thanks!
--
Regards,
Łukasz Adamczak
More information about the MacRuby-devel
mailing list