range.c: hide internal `__num_to_a' method from backtrace.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-09-03 16:28:46 +09:00
parent 161f2403b3
commit dc4b60291a
+1
View File
@@ -350,6 +350,7 @@ range_num_to_a(mrb_state *mrb, mrb_value range)
mrb_value end = RANGE_END(r);
mrb_value ary;
mrb->c->ci->mid = 0;
if (mrb_nil_p(end)) {
mrb->c->ci->mid = 0;
mrb_raise(mrb, E_RANGE_ERROR, "cannot convert endless range to an array");