summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index 6c9dd2996..f05ac8e1c 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2844,7 +2844,7 @@ mrb_str_byteslice(mrb_state *mrb, mrb_value str)
}
}
else {
- beg = mrb_integer(mrb_to_integer(mrb, a1));
+ beg = mrb_as_int(mrb, a1);
len = 1;
empty = FALSE;
}