summaryrefslogtreecommitdiff
path: root/compar.c
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2021-09-15 08:11:05 +0900
committerGitHub <noreply@github.com>2021-09-15 08:11:05 +0900
commitb8c3a84bddac7366c4e391234b2535253869e885 (patch)
tree872dfa2014b75fc4c5dadb060900afa118cded71 /compar.c
parent89242279e61b023a81c58065c62a82de8829d0b3 (diff)
Refactor and Using RBOOL macro
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4837 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'compar.c')
-rw-r--r--compar.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/compar.c b/compar.c
index 7974017e2b..e9d1ac41f9 100644
--- a/compar.c
+++ b/compar.c
@@ -84,8 +84,7 @@ cmp_equal(VALUE x, VALUE y)
c = rb_exec_recursive_paired_outer(cmp_eq_recursive, x, y, y);
if (NIL_P(c)) return Qfalse;
- if (rb_cmpint(c, x, y) == 0) return Qtrue;
- return Qfalse;
+ return RBOOL(rb_cmpint(c, x, y) == 0);
}
static int