[MacRuby-devel] Simple Example Fails

Robert Love rblove_lists at comcast.net
Sat Apr 10 18:49:48 PDT 2010


On Apr 10, 2010, at 8:17 PM, Thibault Martin-Lagardette wrote:

> Hi,
> 
> What version are you using?

owl:~ rlove$ macruby --version
MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, x86_64]


I had a nightly installed last night but then the HotCoca demos wouldn't run so I went and fetched 0.5 and installed it.

Maybe I should do a complete removal and then install 0.5 again.   What are the components to get rid of when doing a clean install?



> Since we rewrote the bridge between hash and dictionaries, it is possible that thing have changed since then.
> 
> However, with the latest trunk / nightlies, it should work. Here is what I get:
> 
> >> h = {}
> => {}
> >> h.class
> => Hash
> >> h.setObject 'foo', forKey:42
> => {42=>"foo"}
> 
> Let us know :-)
> 
> -- 
> Thibault Martin-Lagardette
> 
> 
> 
> On Apr 10, 2010, at 18:12, Robert Love wrote:
> 
>> 
>> 
>> I'm trying to learn Macruby and am using Apple's page as a guide:
>> 
>> http://developer.apple.com/mac/articles/scriptingautomation/cocoaappswithmacruby.html
>> 
>> I'm using macirb to follow the example and getting complete different answers.  Is the web page wrong?  Is Macruby wrong?  Am I doing something wrong?
>> 
>> 
>> irb(main):001:0> h = {}
>> => {}
>> irb(main):002:0> h.class
>> => NSMutableDictionary
>> irb(main):003:0> h.setObject 'foo', forKey:42
>> => {1=>"foo"}
>> irb(main):004:0> 
>> 
>> 
>> Why isn't the key 42 like the Apple web page shows?
>> 
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100410/427968c0/attachment-0001.html>


More information about the MacRuby-devel mailing list