[MacRuby-devel] MacRuby 0.5b1: Tinkering with -[NSObject hash]

Laurent Sansonetti lsansonetti at apple.com
Sat Nov 14 18:53:28 PST 2009

Hi Frank,

Thanks for the report, it looks like a critical bug in MacRuby. Could  
you file a bug report on Trac? This way we won't forget it for the  
upcoming release.


On Nov 13, 2009, at 6:16 AM, Frank Illenberger wrote:

> Hi everybody,
> I just found out the hard way, that initializing the MacRuby runtime  
> seems to alter the values returned by -[NSObject hash] even for  
> objects of non-ruby classes. In my Objective-C application, I am  
> loading the MacRuby runtime lazily once the user needs to load a  
> Ruby plug-in. This immediately destroys all NSDictionaries/ 
> NSMapTables/NSSets that have been filled with objects before the  
> loading.
> The only workaround I have found so far, is to call -[MacRuby  
> sharedRuntime] early at the start of the application, but this  
> results in an unnecessarily slower startup time and a larger memory  
> footprint.
> Is the change in the hash values meant by design or might it be a  
> bug in MacRuby?
> Cheers
> Frank
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

More information about the MacRuby-devel mailing list