1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* hash.c (hash_i): avoid too frequent hash conflict where key and

value are same.  a patch from Yusuke ENDOH <mame AT tsg.ne.jp>.
  [ruby-dev:31802]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-09-24 13:18:02 +00:00
parent af4310be97
commit 5f93fa308b
2 changed files with 5 additions and 0 deletions

View file

@ -2,6 +2,10 @@ Mon Sep 24 22:14:13 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/weakref.rb (WeakRef): remove debug print. [ruby-dev:31799]
* hash.c (hash_i): avoid too frequent hash conflict where key and
value are same. a patch from Yusuke ENDOH <mame AT tsg.ne.jp>.
[ruby-dev:31802]
Mon Sep 24 17:56:21 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/strscan/strscan.c (strscan_initialize, strscan_getch): use the

1
hash.c
View file

@ -1464,6 +1464,7 @@ hash_i(VALUE key, VALUE val, int *hval)
{
if (key == Qundef) return ST_CONTINUE;
*hval ^= rb_hash(key);
*hval *= 137;
*hval ^= rb_hash(val);
return ST_CONTINUE;
}