Commit 40f48034 authored by Corey Powell's avatar Corey Powell Committed by Blaž Hrastnik

Added changed check to the mrb_include_module

parent ce667271
......@@ -834,7 +834,10 @@ include_module_at(mrb_state *mrb, struct RClass *klass, struct RClass *c, struct
MRB_API void
mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
{
include_module_at(mrb, c, c->origin, m, 1);
int changed = include_module_at(mrb, c, c->origin, m, 1);
if (changed < 0) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "cyclic include detected");
}
}
MRB_API void
......
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