summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-09 08:42:42 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-09 08:42:42 +0000
commit8abc55bc54480451fe43a1cf79351fde0b14816d (patch)
tree1a884e3a600b00eaedae08947328142434149c7a /hash.c
parentb90076e85c3b2e29a4e6bd56b01c03d77b2bc1cd (diff)
downloadbundler-8abc55bc54480451fe43a1cf79351fde0b14816d.tar.gz
* hash.c (rb_any_hash): should treat the return value of rb_objid_hash()
as `long', because ruby assumes the object id of an object is `long'. this fixes test failures on mswin64 introduced at r44525. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 51ba38dd58..7074413ce1 100644
--- a/hash.c
+++ b/hash.c
@@ -132,7 +132,8 @@ rb_any_hash(VALUE a)
if (SPECIAL_CONST_P(a)) {
if (a == Qundef) return 0;
- hnum = rb_objid_hash((st_index_t)a);
+ /* assume hnum is long, so need to drop upper dword on LLP64. */
+ hnum = (long)rb_objid_hash((st_index_t)a);
}
else if (BUILTIN_TYPE(a) == T_STRING) {
hnum = rb_str_hash(a);