summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-09 01:13:20 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-09 01:13:20 +0000
commit191108a6d0ec2c2b1c1fd89b8ccb3e4b53e5314d (patch)
treefb5492505fcbcfdae1e28b8f7b2abb647d975328 /vm.c
parent7c8b5e8f1165bcfb98ea6a009b4743f552cbbe46 (diff)
There is a path to use bmethod with ifunc.
* vm_insnhelper.c (vm_yield_with_cfunc): use passed me as bmethod. We also need to set `VM_FRAME_FLAG_BMETHOD` if needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 28ed12d9ef..4b99d00710 100644
--- a/vm.c
+++ b/vm.c
@@ -1087,7 +1087,7 @@ invoke_block_from_c_bh(rb_execution_context_t *ec, VALUE block_handler,
case block_handler_type_ifunc:
return vm_yield_with_cfunc(ec, VM_BH_TO_IFUNC_BLOCK(block_handler),
VM_BH_TO_IFUNC_BLOCK(block_handler)->self,
- argc, argv, passed_block_handler);
+ argc, argv, passed_block_handler, NULL);
case block_handler_type_symbol:
return vm_yield_with_symbol(ec, VM_BH_TO_SYMBOL(block_handler),
argc, argv, passed_block_handler);
@@ -1164,7 +1164,7 @@ invoke_block_from_c_proc(rb_execution_context_t *ec, const rb_proc_t *proc,
case block_type_iseq:
return invoke_iseq_block_from_c(ec, &block->as.captured, self, argc, argv, passed_block_handler, NULL, is_lambda, me);
case block_type_ifunc:
- return vm_yield_with_cfunc(ec, &block->as.captured, self, argc, argv, passed_block_handler);
+ return vm_yield_with_cfunc(ec, &block->as.captured, self, argc, argv, passed_block_handler, me);
case block_type_symbol:
return vm_yield_with_symbol(ec, block->as.symbol, argc, argv, passed_block_handler);
case block_type_proc: