Update internal methods not to be listed in backtraces.
String#__lines
Array#__ary_eq
Array#__ary_cmp
Hash#__delete
Kernel#__case_eqq
Integer#__coerce_step_counter
MODIFY
mrbgems/mruby-string-ext/src/string.c
mrbgems/mruby-string-ext/src/string.c
@@ -1184,6 +1184,7 @@ mrb_str_lines(mrb_state *mrb, mrb_value self)
char *p = b, *t;
char *e = b + RSTRING_LEN(self);
+ mrb->c->ci->mid = 0;
result = mrb_ary_new(mrb);
ai = mrb_gc_arena_save(mrb);
while (p < e) {

MODIFY
src/array.c
src/array.c
@@ -1281,6 +1281,7 @@ mrb_ary_eq(mrb_state *mrb, mrb_value ary1)
{
mrb_value ary2 = mrb_get_arg1(mrb);
+ mrb->c->ci->mid = 0;
if (mrb_obj_equal(mrb, ary1, ary2)) return mrb_true_value();
if (!mrb_array_p(ary2)) {
return mrb_false_value();
@@ -1295,6 +1296,7 @@ mrb_ary_cmp(mrb_state *mrb, mrb_value ary1)
{
mrb_value ary2 = mrb_get_arg1(mrb);
+ mrb->c->ci->mid = 0;
if (mrb_obj_equal(mrb, ary1, ary2)) return mrb_fixnum_value(0);
if (!mrb_array_p(ary2)) {
return mrb_nil_value();

MODIFY
src/hash.c
src/hash.c
@@ -1482,6 +1482,7 @@ static mrb_value
mrb_hash_delete(mrb_state *mrb, mrb_value self)
{
mrb_value key = mrb_get_arg1(mrb);
+ mrb->c->ci->mid = 0;
return mrb_hash_delete_key(mrb, self, key);
}

MODIFY
src/kernel.c
src/kernel.c
@@ -585,6 +585,7 @@ mrb_obj_ceqq(mrb_state *mrb, mrb_value self)
mrb_sym eqq = MRB_OPSYM(eqq);
mrb_value ary;
+ mrb->c->ci->mid = 0;
if (mrb_array_p(self)) {
ary = self;
}

MODIFY
src/numeric.c
src/numeric.c
@@ -210,6 +210,7 @@ coerce_step_counter(mrb_state *mrb, mrb_value self)
mrb_get_args(mrb, "oo", &num, &step);
#ifndef MRB_NO_FLOAT
+ mrb->c->ci->mid = 0;
if (mrb_float_p(self) || mrb_float_p(num) || mrb_float_p(step)) {
return mrb_to_float(mrb, self);
}

Update internal methods not to be listed in backtraces.

- String#__lines
- Array#__ary_eq
- Array#__ary_cmp
- Hash#__delete
- Kernel#__case_eqq
- Integer#__coerce_step_counter