summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/string.c b/src/string.c
index a35262eb4..2cfdc337e 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1712,15 +1712,14 @@ mrb_str_reverse_bang(mrb_state *mrb, mrb_value str)
}
}
#endif
- {
- mrb_str_modify(mrb, s);
- if (RSTR_LEN(s) > 1) {
- p = RSTR_PTR(s);
- e = p + RSTR_LEN(s) - 1;
- str_reverse(p, e);
- }
- return str;
+
+ mrb_str_modify(mrb, s);
+ if (RSTR_LEN(s) > 1) {
+ p = RSTR_PTR(s);
+ e = p + RSTR_LEN(s) - 1;
+ str_reverse(p, e);
}
+ return str;
}
/* ---------------------------------- */