Unverified Commit a7871ce7 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4415 from shuujii/remove-unneeded-argc-check-in-mrb_str_aref_m

Remove unneeded `argc` check in `mrb_str_aref_m()`
parents eeb78a72 1a8f6e70
......@@ -1107,9 +1107,6 @@ mrb_str_aref_m(mrb_state *mrb, mrb_value str)
mrb_get_args(mrb, "ii", &n1, &n2);
return str_substr(mrb, str, n1, n2);
}
if (argc != 1) {
mrb_raisef(mrb, E_ARGUMENT_ERROR, "wrong number of arguments (%S for 1)", mrb_fixnum_value(argc));
}
return mrb_str_aref(mrb, str, a1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment