summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-07-12 14:49:55 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-07-12 14:49:55 +0900
commita18904a4c2e661b58fb76df7afa2a0eee4f30e70 (patch)
treedcc885f076ae9f0a73440ef86112d0ca192f4fcb /src/string.c
parente9b57124a07a2f7f8ecee29372e932774d0520ad (diff)
downloadmruby-a18904a4c2e661b58fb76df7afa2a0eee4f30e70.tar.gz
mruby-a18904a4c2e661b58fb76df7afa2a0eee4f30e70.zip
Use "$!" specifier of `mrb_get_args`.
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string.c b/src/string.c
index bfa751332..2cc54a8cf 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1597,7 +1597,7 @@ mrb_str_index(mrb_state *mrb, mrb_value str)
mrb_value sub;
mrb_int pos, clen;
- mrb_get_args(mrb, "*", &argv, &argc);
+ mrb_get_args(mrb, "*!", &argv, &argc);
if (argc == 2) {
mrb_get_args(mrb, "oi", &sub, &pos);
}
@@ -1868,7 +1868,7 @@ mrb_str_rindex(mrb_state *mrb, mrb_value str)
mrb_value sub;
mrb_int pos, len = RSTRING_CHAR_LEN(str);
- mrb_get_args(mrb, "*", &argv, &argc);
+ mrb_get_args(mrb, "*!", &argv, &argc);
if (argc == 2) {
mrb_get_args(mrb, "oi", &sub, &pos);
if (pos < 0) {