From 1e7012f8c1274465e16bf06ff818afb87863d2cc Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 4 Jul 2022 21:47:19 +0900 Subject: [PATCH] class.c (mrb_class_inherited): no need to clear method cache. Since the function is only called for a newly created class, there is no need to modify the method cache here. --- src/class.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/class.c b/src/class.c index 28e21a3fe..ac1065d01 100644 --- a/src/class.c +++ b/src/class.c @@ -565,7 +565,6 @@ mrb_class_inherited(mrb_state *mrb, struct RClass *super, struct RClass *klass) super = mrb->object_class; super->flags |= MRB_FL_CLASS_IS_INHERITED; s = mrb_obj_value(super); - mrb_mc_clear_by_class(mrb, klass); mid = MRB_SYM(inherited); if (!mrb_func_basic_p(mrb, s, mid, mrb_do_nothing)) { mrb_value c = mrb_obj_value(klass);