summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2021-09-15 08:11:05 +0900
committerGitHub <noreply@github.com>2021-09-15 08:11:05 +0900
commitb8c3a84bddac7366c4e391234b2535253869e885 (patch)
tree872dfa2014b75fc4c5dadb060900afa118cded71 /string.c
parent89242279e61b023a81c58065c62a82de8829d0b3 (diff)
Refactor and Using RBOOL macro
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4837 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/string.c b/string.c
index a0cf94ca9f..267efd407c 100644
--- a/string.c
+++ b/string.c
@@ -4630,8 +4630,7 @@ rb_str_include_range_p(VALUE beg, VALUE end, VALUE val, VALUE exclusive)
if (ISASCII(b) && ISASCII(e) && ISASCII(v)) {
if (b <= v && v < e) return Qtrue;
- if (!RTEST(exclusive) && v == e) return Qtrue;
- return Qfalse;
+ return RBOOL(!RTEST(exclusive) && v == e);
}
}
}