aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/hash.c b/hash.c
index a0c1ced09b..1b9b5a2e49 100644
--- a/hash.c
+++ b/hash.c
@@ -1944,10 +1944,17 @@ hash_equal(VALUE hash1, VALUE hash2, int eql)
if (!rb_respond_to(hash2, idTo_hash)) {
return Qfalse;
}
- if (eql)
- return rb_eql(hash2, hash1);
- else
+ if (eql) {
+ if (rb_eql(hash2, hash1)) {
+ return Qtrue;
+ }
+ else {
+ return Qfalse;
+ }
+ }
+ else {
return rb_equal(hash2, hash1);
+ }
}
if (RHASH_SIZE(hash1) != RHASH_SIZE(hash2))
return Qfalse;