mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mrb_raisef(): new function. Same as previou version of mrb_raise().
mrb_raise(): API modified. It cannot treat variable arguments.
This commit is contained in:
+1
-1
@@ -580,7 +580,7 @@ mrb_ary_set(mrb_state *mrb, mrb_value ary, mrb_int n, mrb_value val) /* rb_ary_s
|
||||
if (n < 0) {
|
||||
n += a->len;
|
||||
if (n < 0) {
|
||||
mrb_raise(mrb, E_INDEX_ERROR, "index %ld out of array", n - a->len);
|
||||
mrb_raisef(mrb, E_INDEX_ERROR, "index %ld out of array", n - a->len);
|
||||
}
|
||||
}
|
||||
if (a->len <= (int)n) {
|
||||
|
||||
Reference in New Issue
Block a user