summaryrefslogtreecommitdiff
path: root/vm_args.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 06:38:08 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 06:38:08 (GMT)
commitceddb498682549c2904f9ffbeffb8ae7102e2d5f (patch)
tree37c5bf178da5201c97caf0ebbba9421bced68e2e /vm_args.c
parent334710c155ad19cfd947ce6bcd7127b97cbe37da (diff)
vm_args.c: wrap symbol ifunc
* vm_args.c (args_setup_block_parameter): wrap a symbol in ifunc by a proc as a block parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 18911b4..b031c0d 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;
}