mrb_include_module support class and module

that not have methods each other
This commit is contained in:
ksss
2014-05-19 19:29:33 +09:00
parent ffbf90bdc8
commit c4a225f0be
+1 -1
View File
@@ -741,7 +741,7 @@ mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
struct RClass *p = c, *ic;
int superclass_seen = 0;
if (c->mt == m->mt) {
if (c->mt && c->mt == m->mt) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "cyclic include detected");
}
while (p) {