summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-03 11:10:16 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-03 11:10:16 (GMT)
commitc3cc282f7f23abb36c10e4df489c04976b9b4004 (patch)
tree1e32deac9ee694c480fd5e81bcb4e6327776e73b /vm.c
parent5ac1972c1a7b56aa1aace73b30c1a8fcd8705ac8 (diff)
* class.c (clone_method): remove redundant check for me->def != NULL.
Now, all `me` have `me->def`. * proc.c (rb_method_entry_location): ditto. * vm.c (rb_vm_check_redefinition_opt_method): ditto. * vm.c (add_opt_method): ditto. * vm_eval.c (vm_call0_body): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/vm.c b/vm.c
index 0702e8a..a772206 100644
--- a/vm.c
+++ b/vm.c
@@ -1237,7 +1237,7 @@ static void
rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass)
{
st_data_t bop;
- if (!me->def || me->def->type == VM_METHOD_TYPE_CFUNC) {
+ if (me->def->type == VM_METHOD_TYPE_CFUNC) {
if (st_lookup(vm_opt_method_table, (st_data_t)me, &bop)) {
int flag = vm_redefinition_check_flag(klass);
@@ -1272,8 +1272,7 @@ add_opt_method(VALUE klass, ID mid, VALUE bop)
{
rb_method_entry_t *me = rb_method_entry_at(klass, mid);
- if (me && me->def &&
- me->def->type == VM_METHOD_TYPE_CFUNC) {
+ if (me && me->def->type == VM_METHOD_TYPE_CFUNC) {
st_insert(vm_opt_method_table, (st_data_t)me, (st_data_t)bop);
}
else {