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.
parent 41eff635
......@@ -915,7 +915,9 @@ boot_defclass(mrb_state *mrb, struct RClass *super)
static void
boot_initmod(mrb_state *mrb, struct RClass *mod)
{
mod->mt = kh_init(mt, mrb);
if (!mod->mt) {
mod->mt = kh_init(mt, mrb);
}
}
static struct RClass*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment