From 191108a6d0ec2c2b1c1fd89b8ccb3e4b53e5314d Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 9 Nov 2018 01:13:20 +0000 Subject: 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 --- vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm.c') 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: -- cgit v1.2.3