Fix SEGV when including an object other than Module

This commit is contained in:
Kazuki Tsujimoto
2012-05-04 19:57:02 +09:00
parent 5a6193ffdd
commit 6545fe241b
+1
View File
@@ -502,6 +502,7 @@ mrb_mod_include(mrb_state *mrb, mrb_value klass)
mrb_value mod;
mrb_get_args(mrb, "o", &mod);
mrb_check_type(mrb, mod, MRB_TT_MODULE);
mrb_include_module(mrb, mrb_class_ptr(klass), mrb_class_ptr(mod));
return mod;
}