Ruby Newbie homepage Ruby Newbie homepage

How to use

Quick guide

Official content
Returns the count of entries in self:
{foo: 0, bar: 1, baz: 2}.length # => 3
Hash#length is an alias for Hash#size.
 
               VALUE
rb_hash_size(VALUE hash)
{
    return INT2FIX(RHASH_SIZE(hash));
}
            

Was this page useful?