diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-24 13:18:02 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-24 13:18:02 +0000 |
| commit | 8f41867954b4a1ed7b4930f80fde583cce057bea (patch) | |
| tree | e512e2dd026f5662cc0baf993355387a54c91f72 /hash.c | |
| parent | 46c0a513af11274ae95fb6823d2872fd72af116f (diff) | |
| download | ruby-8f41867954b4a1ed7b4930f80fde583cce057bea.tar.gz ruby-8f41867954b4a1ed7b4930f80fde583cce057bea.tar.xz ruby-8f41867954b4a1ed7b4930f80fde583cce057bea.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@13508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
| -rw-r--r-- | hash.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; } |
