Permalink
Browse files

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.
  • Loading branch information...
matz committed Jan 12, 2017
1 parent 41eff63 commit 38acb9ec36bdd56123e6680885499fbf7f729f21
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/class.c
View
@@ -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*

0 comments on commit 38acb9e

Please sign in to comment.