21 May
2009
21 May
'09
10:53 a.m.
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