hash()
public
Generates a Fixnum hash value for this object. This function must
have the property that a.eql?(b) implies
a.hash == b.hash. The hash
value is used by class Hash. Any hash value
that exceeds the capacity of a Fixnum will be
truncated before being used.
"waffle".hash
Show source
VALUE
rb_obj_hash(VALUE obj)
{
VALUE oid = rb_obj_id(obj);
st_index_t index = NUM2LONG(oid);
st_index_t index = NUM2LL(oid);
st_index_t h = rb_hash_end(rb_hash_start(index));
return LONG2FIX(h);
}