On 2010-10-05, at 18:15 , Laurent Sansonetti wrote:
>
> You found out an exception :) As you know, NSArray responds to -count which
> simply return the number of elements it contains. But Ruby Array defines
> #count which has different semantics.
>
> To not conflict with NSArray, the Ruby #coun
Hi Caio,
You found out an exception :) As you know, NSArray responds to -count which
simply return the number of elements it contains. But Ruby Array defines #count
which has different semantics.
To not conflict with NSArray, the Ruby #count is only defined on Ruby arrays.
However, I do not un
Hi all,
Code first:
cocoa_array = NSArray.new
ruby_array = []
puts ruby_array.count # => 0
puts ruby_array.count { true } # => 0
puts ruby_array.count("whatever") # => 0
puts cocoa_array.count # => 0
puts cocoa_array.count { true }