diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-04 10:19:55 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-04 10:19:55 +0000 |
| commit | 70ffde268cacaaed028c0ca7454181529e0ea802 (patch) | |
| tree | e3a318c59e5da93ff7d091cfda9a158de6b8d7bb | |
| parent | 6ac57385afa50e6df172d07a39b148a417d836b9 (diff) | |
| download | ruby-70ffde268cacaaed028c0ca7454181529e0ea802.tar.gz ruby-70ffde268cacaaed028c0ca7454181529e0ea802.tar.xz ruby-70ffde268cacaaed028c0ca7454181529e0ea802.zip | |
* hash.c (hash_equal): two hash tables are different when internal
comparison table differ. [ruby-dev:33989]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | hash.c | 2 |
2 files changed, 5 insertions, 0 deletions
@@ -3,6 +3,9 @@ Tue Mar 4 19:10:43 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * hash.c (rb_hash_aset): should not copy key string when compare_by_identity is set. [ruby-dev:33604] + * hash.c (hash_equal): two hash tables are different when internal + comparison table differ. [ruby-dev:33989] + Tue Mar 4 16:29:06 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (parser_yylex): disallow non digits '0o' expression. @@ -1397,6 +1397,8 @@ hash_equal(VALUE hash1, VALUE hash2, int eql) return Qfalse; if (!RHASH(hash1)->ntbl || !RHASH(hash2)->ntbl) return Qtrue; + if (RHASH(hash1)->ntbl->type != RHASH(hash2)->ntbl->type) + return Qfalse; #if 0 if (!(rb_equal(RHASH(hash1)->ifnone, RHASH(hash2)->ifnone) && FL_TEST(hash1, HASH_PROC_DEFAULT) == FL_TEST(hash2, HASH_PROC_DEFAULT))) |
