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 /cont.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 'cont.c')
-rw-r--r-- | cont.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -1085,12 +1085,7 @@ fiber_memsize(const void *ptr) VALUE rb_obj_is_fiber(VALUE obj) { - if (rb_typeddata_is_kind_of(obj, &fiber_data_type)) { - return Qtrue; - } - else { - return Qfalse; - } + return RBOOL(rb_typeddata_is_kind_of(obj, &fiber_data_type)); } static void @@ -2351,7 +2346,7 @@ rb_fiber_transfer(VALUE fiber_value, int argc, const VALUE *argv) VALUE rb_fiber_blocking_p(VALUE fiber) { - return (fiber_ptr(fiber)->blocking == 0) ? Qfalse : Qtrue; + return RBOOL(fiber_ptr(fiber)->blocking != 0); } /* |