From 9245462499e7c3216a468aadccdc11e69de8cd54 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 12 Dec 2019 22:43:00 -0800 Subject: 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. --- vm_method.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vm_method.c b/vm_method.c index 2f1817a9ea..bcf6b0b8c0 100644 --- a/vm_method.c +++ b/vm_method.c @@ -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); -- cgit v1.2.3