[MacRuby-devel] NSSet and Set broken in MacRuby 0.5 final?

Frank Illenberger illenberger at mac.com
Sat Feb 13 15:43:13 PST 2010


Hi Laurent,

> Hi Frank,
> 
>> 
>> today I updated my MacRuby installation from MacRuby 0.5b1 to 0.5 final. Sadly, this broke my class "MERStandard" which used a Set.
>> My Cocoa app embeds the MacRuby.framework. I initialized an empty set like this, which worked fine with MacRuby 0.5b1
>> 
>> mySet = Set.new
>> 
>> With MacRuby 0.5 final I am getting the following error:
>> 
>> An exception occured: NameError uninitialized constant MERStandard::Set
>> 
>> If I put a
>> 
>> require 'set'
>> 
>> at the top of my class file, I get the following error:
>> 
>> An exception occured: LoadError no such file to load -- set
>> 
>> Am I doing something wrong or was anything substantial changed in the relase version?
> 
> In the final 0.5 release we decided to revert our NSSet-based implementation of set and use the pure-Ruby implementation, so you do need to require 'set'. If 'set' can't be found in your application bundle maybe it's because you did not embed the standard library? 

Ah, good to know. But my embedded MacRuby.framework contains all the stuff in Versions/0.5/usr/lib/ruby/1.9.0 including set.rb. Isn't this the whole standard library? 
I am loading my Ruby classes into my Cocoa app by performing a "load" command passed to -[MacRuby evaluateString:]
Might this be a wrong configuration so that MacRuby can't find the embedded standard library?

Cheers

Frank

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100214/994e066a/attachment.html>


More information about the MacRuby-devel mailing list