summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-12-29 16:39:56 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-12-29 16:39:56 +0900
commitb6d31810feca09ac284eda84cf0d2215ced5ec6c (patch)
treeeff6cca80af459748d636b8a1f0bd84a014222db /src
parent4f297ac29cec0c12aae1f7fd56390fdb6b925547 (diff)
downloadmruby-b6d31810feca09ac284eda84cf0d2215ced5ec6c.tar.gz
mruby-b6d31810feca09ac284eda84cf0d2215ced5ec6c.zip
string.c: use `mrb_as_int` macro.
Diffstat (limited to 'src')
-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;
}