summaryrefslogtreecommitdiff
path: root/vm_args.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm_args.c b/vm_args.c
index 18911b4a5d..b031c0dc64 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -478,6 +478,10 @@ args_setup_block_parameter(rb_thread_t *th, struct rb_calling_info *calling, VAL
GetProcPtr(blockval, proc);
calling->blockptr = &proc->block;
}
+ else if (RUBY_VM_IFUNC_P(blockptr->proc)) {
+ const ID mid = (ID)((struct vm_ifunc *)blockptr->proc)->data;
+ blockval = rb_sym_to_proc(ID2SYM(mid));
+ }
else {
blockval = blockptr->proc;
}