summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/object.c b/object.c
index 466ec75492..bb43b4617e 100644
--- a/object.c
+++ b/object.c
@@ -161,6 +161,7 @@ rb_obj_equal(VALUE obj1, VALUE obj2)
VALUE
rb_obj_hash(VALUE obj)
{
+ long rb_objid_hash(st_index_t index);
VALUE oid = rb_obj_id(obj);
#if SIZEOF_LONG == SIZEOF_VOIDP
st_index_t index = NUM2LONG(oid);
@@ -169,8 +170,7 @@ rb_obj_hash(VALUE obj)
#else
# error not supported
#endif
- st_index_t h = rb_hash_end(rb_hash_start(index));
- return LONG2FIX(h);
+ return LONG2FIX(rb_objid_hash(index));
}
/*