summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorS-H-GAMELINKS <gamelinks007@gmail.com>2022-01-15 23:07:32 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-17 13:49:37 +0900
commit804a71497187556f9fbbb66dfa602c5942224786 (patch)
tree7e0c79d3f1c328fc4cb82bf2951074158f196f7a /re.c
parent3515867381e34a04f2d64086ac283cd9536a8b20 (diff)
Replace to RBOOL macro
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5449
Diffstat (limited to 're.c')
-rw-r--r--re.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/re.c b/re.c
index d91909a743..d37851a251 100644
--- a/re.c
+++ b/re.c
@@ -3297,10 +3297,7 @@ rb_reg_eqq(VALUE re, VALUE str)
return Qfalse;
}
start = rb_reg_search(re, str, 0, 0);
- if (start < 0) {
- return Qfalse;
- }
- return Qtrue;
+ return RBOOL(start >= 0);
}