[MacRuby-devel] Hash Table

Joe West mrjoewest+macruby-devel at gmail.com
Mon Apr 18 10:40:19 PDT 2011

On Mon, Apr 18, 2011 at 10:40 AM, Ricky Chilcott
<ricky at rickychilcott.com> wrote:
> I'd noticed that too. I thought Strings were actually NSStrings.

They are NSMutableStrings/NSStrings underneath:

irb(main):013:0> "string".class.ancestors
=> [String, NSMutableString, NSString, Comparable, NSObject,
PP::ObjectMixin, Kernel]

And hashes are similarly NSMutableDictionary/NSDictionary:

irb(main):015:0> {}.class.ancestors
=> [Hash, NSMutableDictionary, NSDictionary, Enumerable, NSObject,
PP::ObjectMixin, Kernel]

Couldn't say for sure, but seems like a good move to improve
consistency/compatibility with non-MacRuby code and gems and the like.


More information about the MacRuby-devel mailing list