On Feb 15, 2010, at 3:18 AM, Thibault Martin-Lagardette wrote:
> Hi Erik!
>
> NSArray, when instanciated, becomes the equivalent of a ruby array, see for
> yourself with macirb:
> >> a = NSArray.alloc.init
> => []
> >> a.class
> => Array
>
> However, you are right, it might need to become frozen
On Feb 15, 2010, at 3:18 AM, Thibault Martin-Lagardette wrote:
> Hi Erik!
>
> NSArray, when instanciated, becomes the equivalent of a ruby array, see for
> yourself with macirb:
> >> a = NSArray.alloc.init
> => []
> >> a.class
> => Array
>
> However, you are right, it might need to become frozen
Hi Erik!
NSArray, when instanciated, becomes the equivalent of a ruby array, see for
yourself with macirb:
>> a = NSArray.alloc.init
=> []
>> a.class
=> Array
However, you are right, it might need to become frozen, because otherwise, this
happens:
>> a << "MacRuby"
2010-02-15 11:57:08.766 macru
Hello.
This is just a thought, but shouldn't for instance NSArray.alloc.init.frozen?
return true, as it is immutable and cannot be changed? It is like a frozen
version of NSMutableArray, isn't it?
It's a bit confusing when asking an immutable Foundation object if it is
frozen, and it says no...