1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Replace debug test with assertion

It's a Ruby bug if this ever happens check it as an assertion instead of
paying the cost of the check every time.
This commit is contained in:
John Hawthorn 2019-12-12 22:43:00 -08:00 committed by Aaron Patterson
parent a01d22b8c1
commit 9245462499
Notes: git 2019-12-18 02:19:26 +09:00

View file

@ -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);