I yesterday night investigated a few ways to work around this problem, temporarily, but wasn't able to find one that would work without impacting the current YARV dispatching performance. Let's therefore keep this bug around and in theory it should be automatically fixed once we will use the Objective-C dispatcher for everything. Laurent On Mar 4, 2008, at 11:46 PM, Satoshi Nakagawa wrote:
Oh sorry. You are right. performSelector worked well for (id)test;
-- Satoshi Nakagawa
On 2008/03/05, at 15:03, Laurent Sansonetti wrote:
Ah yes, it's because your test method is defined as returning "void", but MacRuby wants to convert the return value because [NSObject -performSelector:] is registered in the runtime to return an Objective-C object instead (@).
Calling [-performSelector:] on methods that do not return '@' isn't a good idea, as in RubyCocoa.
But we need to fix the real bug, which is that the test method should be called in priority, and not Kernel#test :)
Laurent