mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
class.c (prepare_singleton_class): defer method table allocation
This commit is contained in:
+1
-1
@@ -370,7 +370,7 @@ prepare_singleton_class(mrb_state *mrb, struct RBasic *o)
|
||||
if (o->c->tt == MRB_TT_SCLASS) return;
|
||||
sc = MRB_OBJ_ALLOC(mrb, MRB_TT_SCLASS, mrb->class_class);
|
||||
sc->flags |= MRB_FL_CLASS_IS_INHERITED;
|
||||
sc->mt = mt_new(mrb);
|
||||
sc->mt = NULL;
|
||||
sc->iv = NULL;
|
||||
if (o->tt == MRB_TT_CLASS) {
|
||||
c = (struct RClass*)o;
|
||||
|
||||
Reference in New Issue
Block a user