summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-06 02:33:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-06 02:33:38 +0000
commit536ef60a6897603b615b4d24eab6c0fcfbf07596 (patch)
treeb88dc964b3c627656d96788d0971f6bce68ef704
parentb4f61ad610536eb8102c31b882dda44967ecd5a9 (diff)
vm_eval.c: no use of SYM2ID
* vm_eval.c (check_funcall_missing): no longer turn an ID into a symbol temporarily to get rid of use of SYM2ID. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--vm_eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 6e09042ccb..8dd9653840 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -350,7 +350,7 @@ rb_call0(VALUE recv, ID mid, int argc, const VALUE *argv,
struct rescue_funcall_args {
VALUE recv;
- VALUE sym;
+ ID mid;
int argc;
const VALUE *argv;
};
@@ -361,7 +361,7 @@ check_funcall_exec(struct rescue_funcall_args *args)
VALUE new_args = rb_ary_new4(args->argc, args->argv);
VALUE ret;
- rb_ary_unshift(new_args, args->sym);
+ rb_ary_unshift(new_args, ID2SYM(args->mid));
ret = rb_funcall2(args->recv, idMethodMissing,
args->argc+1, RARRAY_CONST_PTR(new_args));
RB_GC_GUARD(new_args);
@@ -371,7 +371,7 @@ check_funcall_exec(struct rescue_funcall_args *args)
static VALUE
check_funcall_failed(struct rescue_funcall_args *args, VALUE e)
{
- if (rb_respond_to(args->recv, SYM2ID(args->sym))) {
+ if (rb_respond_to(args->recv, args->mid)) {
rb_exc_raise(e);
}
return Qundef;
@@ -421,7 +421,7 @@ check_funcall_missing(rb_thread_t *th, VALUE klass, VALUE recv, ID mid, int argc
th->method_missing_reason = 0;
args.recv = recv;
- args.sym = ID2SYM(mid);
+ args.mid = mid;
args.argc = argc;
args.argv = argv;
return rb_rescue2(check_funcall_exec, (VALUE)&args,