diff options
author | S.H <gamelinks007@gmail.com> | 2021-09-15 08:11:05 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 08:11:05 +0900 |
commit | b8c3a84bddac7366c4e391234b2535253869e885 (patch) | |
tree | 872dfa2014b75fc4c5dadb060900afa118cded71 /error.c | |
parent | 89242279e61b023a81c58065c62a82de8829d0b3 (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 'error.c')
-rw-r--r-- | error.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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 |