mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* hash.c (hash_i): make Hash#hash order insensitive.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ec903b6c8
commit
5d4d154553
4 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Jun 9 03:24:18 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* hash.c (hash_i): make Hash#hash order insensitive.
|
||||
|
||||
Mon Jun 9 03:22:43 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (VENDOR_DIR): use LIBDIR instead of PREFIX as well as
|
||||
|
|
1
hash.c
1
hash.c
|
@ -1602,7 +1602,6 @@ hash_i(key, val, hval)
|
|||
{
|
||||
if (key == Qundef) return ST_CONTINUE;
|
||||
*hval ^= rb_hash(key);
|
||||
*hval *= 137;
|
||||
*hval ^= rb_hash(val);
|
||||
return ST_CONTINUE;
|
||||
}
|
||||
|
|
|
@ -635,4 +635,7 @@ class TestHash < Test::Unit::TestCase
|
|||
assert_equal([], expected - vals)
|
||||
end
|
||||
|
||||
def test_hash_hash
|
||||
assert_equal({0=>2,11=>1}.hash, {11=>1,0=>2}.hash)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define RUBY_RELEASE_DATE "2008-06-09"
|
||||
#define RUBY_VERSION_CODE 187
|
||||
#define RUBY_RELEASE_CODE 20080609
|
||||
#define RUBY_PATCHLEVEL 13
|
||||
#define RUBY_PATCHLEVEL 14
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 8
|
||||
|
|
Loading…
Add table
Reference in a new issue