/* * call-seq: * obj.hash => fixnum * * Generates a <code>Fixnum</code> hash value for this object. This * function must have the property that <code>a.eql?(b)</code> implies * <code>a.hash == b.hash</code>. The hash value is used by class * <code>Hash</code>. Any hash value that exceeds the capacity of a * <code>Fixnum</code> will be truncated before being used. */ VALUE rb_obj_id(obj) VALUE obj; { if (SPECIAL_CONST_P(obj)) { return LONG2NUM((long)obj); } return (VALUE)((long)obj|FIXNUM_FLAG); }