summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-04 10:19:55 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-04 10:19:55 +0000
commita110ef359aea39502990eba1a01952411b55cda7 (patch)
treee3a318c59e5da93ff7d091cfda9a158de6b8d7bb /hash.c
parentf8c5b8ec90cec4a8db42bd07f97c475ba6353b10 (diff)
* hash.c (hash_equal): two hash tables are different when internal
comparison table differ. [ruby-dev:33989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 3b74b8c20b..2cb7270304 100644
--- a/hash.c
+++ b/hash.c
@@ -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)))