summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-06-16 22:07:05 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-06-17 10:13:40 +0900
commite4f891ce8d4833fea1e1f9abd69c2896d429a948 (patch)
tree81fb457e6485236fb55ab52628fdd8af9e0fcd64 /string.c
parent4e097226370ec93bd25823d6a0dd34963619b1b9 (diff)
Adjust styles [ci skip]
* --braces-after-func-def-line * --dont-cuddle-else * --procnames-start-lines * --space-after-for * --space-after-if * --space-after-while
Diffstat (limited to 'string.c')
-rw-r--r--string.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/string.c b/string.c
index 145a153096..d763120095 100644
--- a/string.c
+++ b/string.c
@@ -3718,7 +3718,8 @@ rb_str_index_m(int argc, VALUE *argv, VALUE str)
if (rb_reg_search(sub, str, pos, 0) < 0) {
return Qnil;
- } else {
+ }
+ else {
VALUE match = rb_backref_get();
struct re_registers *regs = RMATCH_REGS(match);
pos = rb_str_sublen(str, BEG(0));
@@ -10132,7 +10133,7 @@ rb_str_rpartition(VALUE str, VALUE sep)
else {
pos = rb_str_sublen(str, pos);
pos = rb_str_rindex(str, sep, pos);
- if(pos < 0) {
+ if (pos < 0) {
goto failed;
}
pos = rb_str_offset(str, pos);