From 1f557eaea15d96b4b16ac1d25ea98ee58d062912 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 22 Aug 2015 05:43:59 +0000 Subject: [PATCH] vm_eval.c: pass thread too * vm_eval.c (check_funcall_missing): pass same thread to call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm_eval.c b/vm_eval.c index ee22bba13d..65bb81afc1 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -347,6 +347,7 @@ rb_call0(VALUE recv, ID mid, int argc, const VALUE *argv, } struct rescue_funcall_args { + rb_thread_t *th; VALUE defined_class; VALUE recv; ID mid; @@ -358,7 +359,7 @@ struct rescue_funcall_args { static VALUE check_funcall_exec(struct rescue_funcall_args *args) { - return call_method_entry(GET_THREAD(), args->defined_class, + return call_method_entry(args->th, args->defined_class, args->recv, idMethodMissing, args->me, args->argc, args->argv); } @@ -397,6 +398,7 @@ check_funcall_missing(rb_thread_t *th, VALUE klass, VALUE recv, ID mid, int argc new_args[0] = ID2SYM(mid); MEMCPY(new_args+1, argv, VALUE, argc); th->method_missing_reason = MISSING_NOENTRY; + args.th = th; args.recv = recv; args.me = me; args.mid = mid;