class.c: `const_missing` do not have to be in the backtrace; ref #5528

parent e1b17016
......@@ -2460,6 +2460,7 @@ mrb_mod_const_missing(mrb_state *mrb, mrb_value mod)
mrb_sym sym;
mrb_get_args(mrb, "n", &sym);
mrb->c->ci->mid = 0;
if (mrb_class_real(mrb_class_ptr(mod)) != mrb->object_class) {
mrb_name_error(mrb, sym, "uninitialized constant %v::%n", mod, sym);
......
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