Permalink
Browse files

* 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
  • Loading branch information...
1 parent b90076e commit 8abc55bc54480451fe43a1cf79351fde0b14816d @unak unak committed Jan 9, 2014
Showing with 8 additions and 1 deletion.
  1. +6 −0 ChangeLog
  2. +2 −1 hash.c
View
@@ -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
View
@@ -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);

0 comments on commit 8abc55b

Please sign in to comment.