Permalink
Browse files

Singleton classes do not have outer class set; fix #3505

  • Loading branch information...
matz committed Mar 16, 2017
1 parent b64f087 commit 47cc5d66e3a2b2b53f7c172aaf4c38baee162556
Showing with 0 additions and 4 deletions.
  1. +0 −4 src/class.c
View
@@ -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);
}

0 comments on commit 47cc5d6

Please sign in to comment.