diff options
author | John Hawthorn <john@hawthorn.email> | 2019-12-12 22:43:00 -0800 |
---|---|---|
committer | Aaron Patterson <tenderlove@github.com> | 2019-12-17 09:19:00 -0800 |
commit | 9245462499e7c3216a468aadccdc11e69de8cd54 (patch) | |
tree | 8686a5e77fe6698d7d2dc7e915dcb4f3956b118f /vm_method.c | |
parent | a01d22b8c16d9bd44767cced8d45398493af0a7c (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2752
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 5 |
1 files changed, 1 insertions, 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); |