summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-07-05 17:57:23 +0900
committerYukihiro Matsumoto <[email protected]>2012-07-05 17:57:23 +0900
commitfbfef55152364b71df9eef8187fce94a5054ee5b (patch)
treee4cb461727edef16dff14625e20a8d1a25dab6be /src
parentca930538eaac4aa64ce65ef6dbf6c60fe3caccab (diff)
downloadmruby-fbfef55152364b71df9eef8187fce94a5054ee5b.tar.gz
mruby-fbfef55152364b71df9eef8187fce94a5054ee5b.zip
Module#include should also include included modules; close #340
Diffstat (limited to 'src')
-rw-r--r--src/class.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/class.c b/src/class.c
index 0e7696972..7e0512322 100644
--- a/src/class.c
+++ b/src/class.c
@@ -646,6 +646,7 @@ mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
{
struct RClass *ic;
+ if (m->super) mrb_include_module(mrb, c, m->super);
ic = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_ICLASS, mrb->class_class);
ic->c = m;
ic->mt = m->mt;