mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Bugfix, included_modules would include classes
This commit is contained in:
+3
-1
@@ -1004,7 +1004,9 @@ mrb_mod_included_modules(mrb_state *mrb, mrb_value self)
|
||||
result = mrb_ary_new(mrb);
|
||||
while (c) {
|
||||
if (c->tt == MRB_TT_ICLASS) {
|
||||
mrb_ary_push(mrb, result, mrb_obj_value(c->c));
|
||||
if (c->c->tt == MRB_TT_MODULE) {
|
||||
mrb_ary_push(mrb, result, mrb_obj_value(c->c));
|
||||
}
|
||||
}
|
||||
c = c->super;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user