Commit cf0fbcd0 authored by Carson McDonald's avatar Carson McDonald

Remove incorrect removal of iv

parent 01c0373f
......@@ -1417,13 +1417,10 @@ mrb_mod_alias(mrb_state *mrb, mrb_value mod)
static void
undef_method(mrb_state *mrb, struct RClass *c, mrb_sym a)
{
mrb_value m, val;
mrb_value m;
if (!mrb_obj_respond_to(c, a)) {
val = mrb_iv_remove(mrb, mrb_obj_value(c), a);
if (mrb_undef_p(val)) {
mrb_name_error(mrb, a, "undefined method '%S' for class '%S'", mrb_sym2str(mrb, a), mrb_obj_value(c));
}
mrb_name_error(mrb, a, "undefined method '%S' for class '%S'", mrb_sym2str(mrb, a), mrb_obj_value(c));
} else {
MRB_SET_VALUE(m, MRB_TT_PROC, value.p, 0);
mrb_define_method_vm(mrb, c, a, m);
......
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