summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-01-07 18:06:24 +0900
committerKoichi Sasada <ko1@atdot.net>2021-01-07 23:44:25 +0900
commit55e52c19e74d5df90560ea1cc4f2a2b9f5d7a5c4 (patch)
treee3b1ada6ab989ff863faa60fa57f3bd16f5d9c68
parent412d26a3857492c9c749b74d72bab07df9d0e028 (diff)
simplify assertion
searched_cme is used only this line so the variable is not needed.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4036
-rw-r--r--vm_insnhelper.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 92bc94767b..e88fb8a4c2 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1695,10 +1695,7 @@ vm_search_cc(const VALUE klass, const struct rb_callinfo * const ci)
return &vm_empty_cc;
}
-#if VM_CHECK_MODE > 0
- const rb_callable_method_entry_t *searched_cme = rb_callable_method_entry(klass, mid);
- VM_ASSERT(cme == searched_cme);
-#endif
+ VM_ASSERT(cme == rb_callable_method_entry(klass, mid));
const struct rb_callcache *cc = vm_cc_new(klass, cme, vm_call_general);
METHOD_ENTRY_CACHED_SET((struct rb_callable_method_entry_struct *)cme);