* 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
This commit is contained in:
ko1 2008-06-26 21:52:44 +00:00
Родитель d7a87286a7
Коммит d4cddaaa4c
2 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Jun 27 06:50:56 2008 Koichi Sasada <ko1@atdot.net>
* 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 <nobu@ruby-lang.org>
* ruby.c (set_arg0, ruby_prog_init): freeze $0. a patch from Keita

Просмотреть файл

@ -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);