summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2021-08-02 12:06:44 +0900
committerGitHub <noreply@github.com>2021-08-02 12:06:44 +0900
commit378e8cdad69e6ba995a024da2957719789f0679e (patch)
tree99ffe0f8055bc10cba3225fb5e7a906f5c3f4543 /gc.c
parent3688b476710def7290e32656b200fefc538366d0 (diff)
Using RBOOL macro
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4695 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gc.c b/gc.c
index f6ea4fc6de..ab7532b47f 100644
--- a/gc.c
+++ b/gc.c
@@ -8600,7 +8600,7 @@ rb_obj_rgengc_writebarrier_protected_p(VALUE obj)
VALUE
rb_obj_rgengc_promoted_p(VALUE obj)
{
- return OBJ_PROMOTED(obj) ? Qtrue : Qfalse;
+ return RBOOL(OBJ_PROMOTED(obj));
}
size_t
@@ -10645,7 +10645,7 @@ rb_objspace_gc_enable(rb_objspace_t *objspace)
int old = dont_gc_val();
dont_gc_off();
- return old ? Qtrue : Qfalse;
+ return RBOOL(old);
}
static VALUE
@@ -10666,7 +10666,7 @@ gc_disable_no_rest(rb_objspace_t *objspace)
{
int old = dont_gc_val();
dont_gc_on();
- return old ? Qtrue : Qfalse;
+ return RBOOL(old);
}
VALUE
@@ -10718,7 +10718,7 @@ gc_set_auto_compact(rb_execution_context_t *ec, VALUE _, VALUE v)
static VALUE
gc_get_auto_compact(rb_execution_context_t *ec, VALUE _)
{
- return ruby_enable_autocompact ? Qtrue : Qfalse;
+ return RBOOL(ruby_enable_autocompact);
}
static int
@@ -12858,7 +12858,7 @@ static VALUE
gc_profile_enable_get(VALUE self)
{
rb_objspace_t *objspace = &rb_objspace;
- return objspace->profile.run ? Qtrue : Qfalse;
+ return RBOOL(objspace->profile.run);
}
/*