Kernel#initialize should not break existing mt; fix
This issue was reported by
The solution is suggested by
MODIFY
src/class.c
src/class.c
@@ -915,8 +915,10 @@ boot_defclass(mrb_state *mrb, struct RClass *super)
static void
boot_initmod(mrb_state *mrb, struct RClass *mod)
{
+ if (!mod->mt) {
mod->mt = kh_init(mt, mrb);
}
+}
static struct RClass*
include_class_new(mrb_state *mrb, struct RClass *m, struct RClass *super)

Kernel#initialize should not break existing mt; fix #3397

This issue was reported by https://hackerone.com/icanthack
The solution is suggested by @clayton-shopify.