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.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-07-04 21:47:19 +09:00
parent e8a202d461
commit 1e7012f8c1
-1
View File
@@ -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);