aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2019-12-12 22:43:00 -0800
committerAaron Patterson <tenderlove@github.com>2019-12-17 09:19:00 -0800
commit9245462499e7c3216a468aadccdc11e69de8cd54 (patch)
tree8686a5e77fe6698d7d2dc7e915dcb4f3956b118f
parenta01d22b8c16d9bd44767cced8d45398493af0a7c (diff)
downloadruby-9245462499e7c3216a468aadccdc11e69de8cd54.tar.gz
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.
-rw-r--r--vm_method.c5
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);