use new mrb_format API from mrb_raisef; its only format specifier is "%S" (stringify) and takes mrb_value; close #1062

This commit is contained in:
Yukihiro Matz Matsumoto
2013-03-27 23:41:23 +09:00
parent 8ce842a5d9
commit 18b2683b97
12 changed files with 70 additions and 68 deletions
+1 -1
View File
@@ -578,7 +578,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_raisef(mrb, E_INDEX_ERROR, "index %" PRIdMRB_INT " out of array", n - a->len);
mrb_raisef(mrb, E_INDEX_ERROR, "index %S out of array", mrb_fixnum_value(n - a->len));
}
}
if (a->len <= (int)n) {