1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_call0): fix calling zsuper from a method with anonymous

rest argument.  [ruby-dev:26639]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-07-29 00:58:14 +00:00
parent b4fef39a40
commit 396e297f2d
3 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Fri Jul 29 09:57:58 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_call0): fix calling zsuper from a method with anonymous
rest argument. [ruby-dev:26639]
Thu Jul 28 21:49:17 2005 IWATSUKI Hiroyuki <don@na.rim.or.jp>
* parse.y (rb_parser_end_seen_p): exclude from ripper.

4
eval.c
View file

@ -5771,7 +5771,7 @@ formal_assign(recv, node, argc, argv, local_vars)
rb_eval(recv, opt);
}
}
if (node->nd_rest && !NIL_P(node->nd_rest)) {
if (RTEST(node->nd_rest)) {
VALUE v;
if (argc > 0)
@ -5923,7 +5923,7 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper)
}
if (node) {
formal_assign(recv, node, argc, argv, local_vars);
if (node->nd_rest) {
if (RTEST(node->nd_rest)) {
ruby_frame->argc = -(ruby_frame->argc - argc)-1;
}
}

View file

@ -8015,7 +8015,7 @@ new_args_gen(parser, m, o, r, b)
}
tmp = tmp->nd_next;
}
if (r && !NIL_P(r)) {
if (RTEST(r)) {
if (arg_dup_check(r->nd_vid, m, list, r)) {
yyerror("duplicated rest argument name");
return 0;