summaryrefslogtreecommitdiff
path: root/vm_args.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-16 03:21:10 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-16 03:21:10 (GMT)
commit6291c6ad77a0587d3d7d5461d969f1bc9bbe866d (patch)
tree70f691e52ce7e69d0cb3859f2e36bfe7961a2fe5 /vm_args.c
parent2fda4a5568e703192cb5eb719b99c067ab5c6db7 (diff)
vm_args.c: symbol proc
* vm_args.c (vm_caller_setup_arg_block): store symbols instead of ifuncs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/vm_args.c b/vm_args.c
index cb20f23..e0c7448 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -477,9 +477,8 @@ 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 if (SYMBOL_P(blockptr->proc)) {
+ blockval = rb_sym_to_proc(blockptr->proc);
}
else {
blockval = blockptr->proc;
@@ -783,9 +782,8 @@ vm_caller_setup_arg_block(const rb_thread_t *th, rb_control_frame_t *reg_cfp,
}
else if (SYMBOL_P(proc) && rb_method_basic_definition_p(rb_cSymbol, idTo_proc)) {
calling->blockptr = RUBY_VM_GET_BLOCK_PTR_IN_CFP(reg_cfp);
- blockiseq = (rb_iseq_t *)IFUNC_NEW(rb_sym_proc_call, SYM2ID(proc), 0);
- calling->blockptr->iseq = blockiseq;
- calling->blockptr->proc = (VALUE)blockiseq;
+ calling->blockptr->iseq = (rb_iseq_t *)proc;
+ calling->blockptr->proc = proc;
}
else if (RUBY_VM_IFUNC_P(proc)) {
calling->blockptr = RUBY_VM_GET_BLOCK_PTR_IN_CFP(reg_cfp);