diff options
author | S.H <gamelinks007@gmail.com> | 2021-08-02 12:06:44 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-02 12:06:44 +0900 |
commit | 378e8cdad69e6ba995a024da2957719789f0679e (patch) | |
tree | 99ffe0f8055bc10cba3225fb5e7a906f5c3f4543 /error.c | |
parent | 3688b476710def7290e32656b200fefc538366d0 (diff) |
Using RBOOL macro
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4695
Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -217,9 +217,7 @@ static VALUE rb_warning_s_aref(VALUE mod, VALUE category) { rb_warning_category_t cat = rb_warning_category_from_name(category); - if (rb_warning_category_enabled_p(cat)) - return Qtrue; - return Qfalse; + return RBOOL(rb_warning_category_enabled_p(cat)); } /* @@ -1231,7 +1229,7 @@ rb_get_message(VALUE exc) static VALUE exc_s_to_tty_p(VALUE self) { - return rb_stderr_tty_p() ? Qtrue : Qfalse; + return RBOOL(rb_stderr_tty_p()); } /* @@ -1802,7 +1800,7 @@ static VALUE nometh_err_init_attr(VALUE exc, VALUE args, int priv) { rb_ivar_set(exc, id_args, args); - rb_ivar_set(exc, id_private_call_p, priv ? Qtrue : Qfalse); + rb_ivar_set(exc, id_private_call_p, RBOOL(priv)); return exc; } |