mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mrb_include_module support class and module
that not have methods each other
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user