summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/string.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/string.c b/src/string.c
index 835e476b6..e93d2ce7f 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1135,9 +1135,7 @@ mrb_str_empty_p(mrb_state *mrb, mrb_value self)
{
struct RString *s = mrb_str_ptr(self);
- if (s->len == 0)
- return mrb_true_value();
- return mrb_false_value();
+ return mrb_true_or_false_value(s->len == 0);
}
/* 15.2.10.5.17 */