summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-20 17:03:41 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-20 17:03:41 +0000
commitf4d9d3d39b2018ea5330c1b21db722cd29ca11b4 (patch)
tree387fa05bd22648f50e6df4a033a4e975900d0692 /hash.c
parentbf6575ef62b4521d6c1d45371372dc1c1e74f18e (diff)
* hash.c (hash_equal): should call rb_eql when argument eql is set.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index d236fa8fa5..11d93af3b9 100644
--- a/hash.c
+++ b/hash.c
@@ -1398,7 +1398,10 @@ hash_equal(VALUE hash1, VALUE hash2, int eql)
if (!rb_respond_to(hash2, rb_intern("to_hash"))) {
return Qfalse;
}
- return rb_equal(hash2, hash1);
+ if (eql)
+ return rb_eql(hash2, hash1);
+ else
+ return rb_equal(hash2, hash1);
}
if (RHASH_SIZE(hash1) != RHASH_SIZE(hash2))
return Qfalse;