class.c: clear method cache after `remove_method`.
MODIFY
src/class.c
src/class.c
@@ -2361,7 +2361,10 @@ mrb_remove_method(mrb_state *mrb, struct RClass *c, mrb_sym mid)
MRB_CLASS_ORIGIN(c);
h = c->mt;
- if (h && mt_del(mrb, h, mid)) return;
+ if (h && mt_del(mrb, h, mid)) {
+ mrb_mc_clear_by_class(mrb, c);
+ return;
+ }
mrb_name_error(mrb, mid, "method '%n' not defined in %C", mid, c);
}

class.c: clear method cache after `remove_method`.