Make `mrb_obj_instance_eval` to use `mrb_singleton_class_ptr`; #4973

parent 87d1bbe9
......@@ -723,15 +723,11 @@ mrb_value
mrb_obj_instance_eval(mrb_state *mrb, mrb_value self)
{
mrb_value a, b;
mrb_value cv;
struct RClass *c;
if (mrb_get_args(mrb, "|S&", &a, &b) == 1) {
mrb_raise(mrb, E_NOTIMP_ERROR, "instance_eval with string not implemented");
}
cv = mrb_singleton_class(mrb, self);
c = mrb_class_ptr(cv);
return eval_under(mrb, self, b, c);
return eval_under(mrb, self, b, mrb_singleton_class_ptr(mrb, self));
}
MRB_API mrb_value
......
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