mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
+2
-2
@@ -345,7 +345,7 @@ mrb_obj_clone(mrb_state *mrb, mrb_value self)
|
||||
mrb_value clone;
|
||||
|
||||
if (mrb_special_const_p(self)) {
|
||||
mrb_raisef(mrb, E_TYPE_ERROR, "can't clone %s", mrb_obj_classname(mrb, self));
|
||||
mrb_raisef(mrb, E_TYPE_ERROR, "can't clone %S", self);
|
||||
}
|
||||
p = (struct RObject*)mrb_obj_alloc(mrb, mrb_type(self), mrb_obj_class(mrb, self));
|
||||
p->c = mrb_singleton_class_clone(mrb, self);
|
||||
@@ -381,7 +381,7 @@ mrb_obj_dup(mrb_state *mrb, mrb_value obj)
|
||||
mrb_value dup;
|
||||
|
||||
if (mrb_special_const_p(obj)) {
|
||||
mrb_raisef(mrb, E_TYPE_ERROR, "can't dup %s", mrb_obj_classname(mrb, obj));
|
||||
mrb_raisef(mrb, E_TYPE_ERROR, "can't dup %S", obj);
|
||||
}
|
||||
p = mrb_obj_alloc(mrb, mrb_type(obj), mrb_obj_class(mrb, obj));
|
||||
dup = mrb_obj_value(p);
|
||||
|
||||
Reference in New Issue
Block a user