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
+4 -4
View File
@@ -690,8 +690,8 @@ mrb_mod_cv_get(mrb_state *mrb, struct RClass * c, mrb_sym sym)
}
c = c->super;
}
mrb_raisef(mrb, E_NAME_ERROR, "uninitialized class variable %s in %s",
mrb_sym2name(mrb, sym), mrb_class_name(mrb, cls));
mrb_raisef(mrb, E_NAME_ERROR, "uninitialized class variable %S in %S",
mrb_sym2str(mrb, sym), cls);
/* not reached */
return mrb_nil_value();
}
@@ -846,8 +846,8 @@ L_RETRY:
}
c = c->super;
}
mrb_raisef(mrb, E_NAME_ERROR, "uninitialized constant %s",
mrb_sym2name(mrb, sym));
mrb_raisef(mrb, E_NAME_ERROR, "uninitialized constant %S",
mrb_sym2str(mrb, sym));
/* not reached */
return mrb_nil_value();
}