diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-05 12:22:24 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-05 12:22:24 +0000 |
commit | ee3e66e7a61c2deba096756aadc390c82fd2d17b (patch) | |
tree | 462f4ce61b5c2a6ee594ff09894f09e5a3f26100 /gc.c | |
parent | 60a40ecaf65435c93ad24a4cbb5cd1779aeb2bda (diff) |
Merged r22308. [ruby-dev:39637]
* hash.c (rb_hash): always return a fixnum value because a return
value of rb_hash may be used as a hash value itself and bignums have
no unique VALUE.
* test/ruby/test_hash.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2142,7 +2142,7 @@ rb_obj_id(obj) return (SYM2ID(obj) * sizeof(RVALUE) + (4 << 2)) | FIXNUM_FLAG; } if (SPECIAL_CONST_P(obj)) { - return LONG2FIX((long)obj); + return LONG2NUM((long)obj); } return (VALUE)((long)obj|FIXNUM_FLAG); } |