summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--hash.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 87b0a81091b..fa8890f51f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jan 9 17:40:28 2014 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * 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.
+
Thu Jan 9 09:55:20 2014 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
diff --git a/hash.c b/hash.c
index 51ba38dd586..7074413ce10 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);