Skip to content

Commit

Permalink
wrong inheritance chain from singleton class
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Apr 20, 2012
1 parent 08451ed commit d9ce44e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/class.c
Expand Up @@ -105,12 +105,7 @@ make_metaclass(mrb_state *mrb, struct RClass *c)
}
sc = mrb_obj_alloc(mrb, MRB_TT_SCLASS, mrb->class_class);
sc->mt = 0;
if (!c->super) {
sc->super = mrb->class_class;
}
else {
sc->super = c->super->c;
}
sc->super = c->c;
c->c = sc;
mrb_field_write_barrier(mrb, (struct RBasic*)c, (struct RBasic*)sc);
mrb_field_write_barrier(mrb, (struct RBasic*)sc, (struct RBasic*)sc->super);
Expand Down

0 comments on commit d9ce44e

Please sign in to comment.