From 8396dfdd9f50f662790a71d0f4199b1e701cab9d Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 31 Oct 2006 16:10:22 +0000 Subject: * eval.c (rb_call0): fixed bug of zsuper with both of opt and rest. fixed: [ruby-list:42928] * test/ruby/test_super.rb: add tests to check above bug. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@11252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index f7924216a..17cd58533 100644 --- a/eval.c +++ b/eval.c @@ -5925,14 +5925,21 @@ rb_call0(klass, recv, id, oid, argc, argv, body, flags) while (opt && argc) { assign(recv, opt->nd_head, *argv, 1); argv++; argc--; + ++i; opt = opt->nd_next; } if (opt) { rb_eval(recv, opt); + while (opt) { + opt = opt->nd_next; + ++i; + } } + } + if (!node->nd_rest) { i = nopt; } - if (node->nd_rest) { + else { VALUE v; if (argc > 0) { -- cgit