Not sure whether this is a Rubymotion bug or whether it's intentional, but it sure is confusing. Let's take the following scenario... we have the following array:
array = NSArray.arrayWithArray([1,2,3,4,5,6])
Maybe we didn't initialize the array ourselves, so we take a look at the class to see what kind of an array it is:
p array.class # Array
Seems like it's a normal ruby array. But when we try to get the count of a certain item on it, it returns an error:
array.count(2) #<ArgumentError: wrong number of arguments (1 for 0)>
So is this intentional? If I create a normal ruby array and try to count a specific item in it, it works fine.