diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-11-06 15:12:28 -0800 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-11-06 15:12:28 -0800 |
commit | e58814d150b0652f5e11958b36b85d977fdd0426 (patch) | |
tree | 1733515f939591caf954d8a80e3010cdd0981491 /hash.c | |
parent | bd2b314a05ae9192b3143e1e678a37c370d8a9ce (diff) | |
download | ruby-e58814d150b0652f5e11958b36b85d977fdd0426.tar.gz |
Revert "Use a monotonically increasing number for object_id"
This reverts commit bd2b314a05ae9192b3143e1e678a37c370d8a9ce.
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -273,14 +273,10 @@ rb_objid_hash(st_index_t index) static st_index_t objid_hash(VALUE obj) { - VALUE object_id = rb_obj_id(obj); - if (!FIXNUM_P(object_id)) - object_id = rb_big_hash(object_id); - #if SIZEOF_LONG == SIZEOF_VOIDP - return (st_index_t)st_index_hash((st_index_t)NUM2LONG(object_id)); + return (st_index_t)st_index_hash((st_index_t)NUM2LONG(rb_obj_id(obj))); #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP - return (st_index_t)st_index_hash((st_index_t)NUM2LL(object_id)); + return (st_index_t)st_index_hash((st_index_t)NUM2LL(rb_obj_id(obj))); #endif } |