From 70ffde268cacaaed028c0ca7454181529e0ea802 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 4 Mar 2008 10:19:55 +0000 Subject: * 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 --- hash.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 3b74b8c20..2cb727030 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))) -- cgit