Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Singleton classes do not have outer class set; fix #3505
  • Loading branch information
matz committed Mar 16, 2017
1 parent b64f087 commit 47cc5d6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/class.c
Expand Up @@ -1222,10 +1222,6 @@ mrb_singleton_class(mrb_state *mrb, mrb_value v)
}
obj = mrb_basic_ptr(v);
prepare_singleton_class(mrb, obj);
if (mrb->c && mrb->c->ci && mrb->c->ci->target_class) {
mrb_obj_iv_set(mrb, (struct RObject*)obj->c, mrb_intern_lit(mrb, "__outer__"),
mrb_obj_value(mrb->c->ci->target_class));
}
return mrb_obj_value(obj->c);
}

Expand Down

0 comments on commit 47cc5d6

Please sign in to comment.