From b8c3a84bddac7366c4e391234b2535253869e885 Mon Sep 17 00:00:00 2001 From: "S.H" Date: Wed, 15 Sep 2021 08:11:05 +0900 Subject: Refactor and Using RBOOL macro --- error.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'error.c') diff --git a/error.c b/error.c index b589384303..84902204d2 100644 --- a/error.c +++ b/error.c @@ -1548,9 +1548,7 @@ exc_equal(VALUE exc, VALUE obj) if (!rb_equal(rb_attr_get(exc, id_mesg), mesg)) return Qfalse; - if (!rb_equal(exc_backtrace(exc), backtrace)) - return Qfalse; - return Qtrue; + return rb_equal(exc_backtrace(exc), backtrace); } /* @@ -1638,10 +1636,7 @@ exit_success_p(VALUE exc) if (NIL_P(status_val)) return Qtrue; status = NUM2INT(status_val); - if (WIFEXITED(status) && WEXITSTATUS(status) == EXIT_SUCCESS) - return Qtrue; - - return Qfalse; + return RBOOL(WIFEXITED(status) && WEXITSTATUS(status) == EXIT_SUCCESS); } static VALUE -- cgit v1.2.1