From ac2864a871ae15ece8d268d47d9e9a1821b0c70b Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 9 Jan 2014 11:34:17 +0000 Subject: * hash.c (rb_objid_hash): should return `long'. brushup r44534. * object.c (rb_obj_hash): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 1398201c83..5b5e283c67 100644 --- a/object.c +++ b/object.c @@ -161,7 +161,7 @@ rb_obj_equal(VALUE obj1, VALUE obj2) VALUE rb_obj_hash(VALUE obj) { - st_index_t rb_objid_hash(st_index_t index); + 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); @@ -170,8 +170,7 @@ rb_obj_hash(VALUE obj) #else # error not supported #endif - st_index_t h = rb_objid_hash(index); - return LONG2FIX(h); + return LONG2FIX(rb_objid_hash(index)); } /* -- cgit v1.2.3