mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
singleton class super initialize failed
This commit is contained in:
+4
-1
@@ -69,7 +69,10 @@ prepare_singleton_class(mrb_state *mrb, struct RBasic *o)
|
||||
sc->iv = 0;
|
||||
if (o->tt == MRB_TT_CLASS) {
|
||||
c = (struct RClass*)o;
|
||||
if (c->super) {
|
||||
if (!c->super) {
|
||||
sc->super = mrb->class_class;
|
||||
}
|
||||
else {
|
||||
sc->super = c->super->c;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user