[MacRuby-devel] Warnings about removing methods

Eloy Duran eloy.de.enige at gmail.com
Mon Jan 5 05:13:24 PST 2009


Hey Vincent,

>> Is there a good reason why MacRuby would need to warn the user  
>> about the hazzards of removing methods?
>> Example:
>> /Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/ 
>> site_ruby/mocha/class_method.rb:50: warning: removing pure  
>> Objective-C method `__stubba__require__stubba__' may cause serious  
>> problem
>
> If you read well the error message it warns for removing a *pure  
> Objective-C* method. It does not warn for methods defined in normal  
> Ruby.

Sure. But first of all, it _isn't_ a pure objc method, it's a Ruby  
method, so not sure when/how this gets classified as a pure objc method…

> If my memory serves me right, removing a method is not supported by  
> the Objective-C runtime. There is a work around to do it, by MacRuby  
> is probably one of the rare applications to do it so it may cause  
> problems.

Second, the worst thing that can happen (afaik) is that the code  
breaks because you removed a method.
And that _should_ break IMO, because that's how Ruby is crafted. So  
it's the developers responsibility
to not introduce bugs in the application code, _not_ of the language/ 
bridge developer.

- Eloy



More information about the MacRuby-devel mailing list