summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-31 16:10:22 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-31 16:10:22 +0000
commit8c61368971e229740b6773b91a48932842e7a39d (patch)
tree9aba4cfa8a2e5f6bef3f6f997a133eb7c9849717 /eval.c
parentc26a1e68078583b2a2d80b1d733364deeeae2615 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index f7924216af..17cd585333 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) {