I agree with Christophe and Tom,  retrieving the size of a hash is an
edge case in my book.

I think the data type might be misused in the implementation, a hash
is intended to be a collection of hashed values that are quickly
accessible via a key.
If you need the number of values in the hash, keep track of this
variable at the point where you're adding the value to hash so its
available without iteration calculations.
On the other side of the argument, if you don't need the accessibility
that the hash allows via key values you may just want to use an
Enumerable/Array.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to