Commit c4a225f0 authored by ksss's avatar ksss

mrb_include_module support class and module

that not have methods each other
parent ffbf90bd
......@@ -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) {
......
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