ruby-changes:64781
From: Koichi <ko1@a...>
Date: Thu, 7 Jan 2021 23:44:52 +0900 (JST)
Subject: [ruby-changes:64781] 55e52c19e7 (master): simplify assertion
https://git.ruby-lang.org/ruby.git/commit/?id=55e52c19e7 From 55e52c19e74d5df90560ea1cc4f2a2b9f5d7a5c4 Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Thu, 7 Jan 2021 18:06:24 +0900 Subject: simplify assertion searched_cme is used only this line so the variable is not needed. diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 92bc947..e88fb8a 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) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1695 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); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/