summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/string.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/string.c b/src/string.c
index db2d73e32..bfe73b359 100644
--- a/src/string.c
+++ b/src/string.c
@@ -449,9 +449,6 @@ str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len)
if (clen == 0) {
len = 0;
}
- else if (beg < 0) {
- beg = clen + beg;
- }
if (beg > clen) return mrb_nil_value();
if (beg < 0) {
beg += clen;