summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'class.c')
-rw-r--r--class.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/class.c b/class.c
index 1281a243ab..5ece9e34e8 100644
--- a/class.c
+++ b/class.c
@@ -912,6 +912,7 @@ rb_module_s_alloc(VALUE klass)
VALUE mod = class_alloc(T_MODULE, klass);
RCLASS_M_TBL_INIT(mod);
FL_SET(mod, RMODULE_ALLOCATED_BUT_NOT_INITIALIZED);
+ RB_OBJ_WRITE(mod, &RCLASS(mod)->super, 0);
return mod;
}