summaryrefslogtreecommitdiff
path: root/array.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 /array.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 'array.c')
-rw-r--r--array.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/array.c b/array.c
index 36f712bcac..bd323cd6b0 100644
--- a/array.c
+++ b/array.c
@@ -2668,9 +2668,7 @@ rb_ary_length(VALUE ary)
static VALUE
rb_ary_empty_p(VALUE ary)
{
- if (RARRAY_LEN(ary) == 0)
- return Qtrue;
- return Qfalse;
+ return RBOOL(RARRAY_LEN(ary) == 0);
}
VALUE