From d4cddaaa4ce60dd5d35e85da4436236a287a622b Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 26 Jun 2008 21:52:44 +0000 Subject: [PATCH] * vm_eval.c (vm_call_super): fix to call method_missing. [ruby-core:15719], [ruby-core:17340] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ vm_eval.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f1fa5527e4..10e341bd72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jun 27 06:50:56 2008 Koichi Sasada + + * vm_eval.c (vm_call_super): fix to call method_missing. + [ruby-core:15719], [ruby-core:17340] + Fri Jun 27 00:00:14 2008 Nobuyoshi Nakada * ruby.c (set_arg0, ruby_prog_init): freeze $0. a patch from Keita diff --git a/vm_eval.c b/vm_eval.c index 8e4ddad2fd..ef84121ef3 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -148,10 +148,12 @@ vm_call_super(rb_thread_t * const th, const int argc, const VALUE * const argv) body = body->nd_body; } else { - dp(recv); - dp(klass); - dpi(id); - rb_bug("vm_call_super: not found"); + VALUE *argv_m = ALLOCA_N(VALUE, argc+1); + MEMCPY(argv_m + 1, argv, VALUE, argc); + argv_m[0] = ID2SYM(id); + th->method_missing_reason = 0; + th->passed_block = 0; + return rb_funcall2(recv, idMethodMissing, argc + 1, argv); } return vm_call0(th, klass, recv, id, id, argc, argv, body, CALL_SUPER);