summaryrefslogtreecommitdiffhomepage
path: root/src/class.c
diff options
context:
space:
mode:
authorKazuki Tsujimoto <[email protected]>2012-05-04 19:57:02 +0900
committerKazuki Tsujimoto <[email protected]>2012-05-04 19:57:02 +0900
commit6545fe241bccb1232f45c0af192f40750bc2cc4f (patch)
treef6d7ecec5e4d2272d432e4e7066105c7bae6ce1b /src/class.c
parent5a6193ffddf6c0d8b3d564a04133d66baf54e511 (diff)
downloadmruby-6545fe241bccb1232f45c0af192f40750bc2cc4f.tar.gz
mruby-6545fe241bccb1232f45c0af192f40750bc2cc4f.zip
Fix SEGV when including an object other than Module
Diffstat (limited to 'src/class.c')
-rw-r--r--src/class.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/class.c b/src/class.c
index 366bde96d..f517cc19a 100644
--- a/src/class.c
+++ b/src/class.c
@@ -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;
}