Skip to content

Commit

Permalink
Replace debug test with assertion
Browse files Browse the repository at this point in the history
It's a Ruby bug if this ever happens check it as an assertion instead of
paying the cost of the check every time.
  • Loading branch information
jhawthorn authored and tenderlove committed Dec 17, 2019
1 parent a01d22b commit 9245462
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions vm_method.c
Expand Up @@ -77,10 +77,7 @@ rb_class_clear_method_cache(VALUE klass, VALUE arg)
}
}
else {
if (RCLASS_CALLABLE_M_TBL(klass) != 0) {
rb_obj_info_dump(klass);
rb_bug("RCLASS_CALLABLE_M_TBL(klass) != 0");
}
VM_ASSERT(RCLASS_CALLABLE_M_TBL(klass) == 0);
}

rb_class_foreach_subclass(klass, rb_class_clear_method_cache, arg);
Expand Down

0 comments on commit 9245462

Please sign in to comment.