Commit f255d33b authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #97 from k-tsj/fix-include-segv

Fix SEGV when including an object other than Module
parents 428e45b6 6545fe24
...@@ -502,6 +502,7 @@ mrb_mod_include(mrb_state *mrb, mrb_value klass) ...@@ -502,6 +502,7 @@ mrb_mod_include(mrb_state *mrb, mrb_value klass)
mrb_value mod; mrb_value mod;
mrb_get_args(mrb, "o", &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)); mrb_include_module(mrb, mrb_class_ptr(klass), mrb_class_ptr(mod));
return mod; return mod;
} }
......
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