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

* parse.y (f_arg): f_norm_arg is a VALUE in ripper, not an ID.

fixed: [ruby-dev:26942]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-09-02 14:51:19 +00:00
parent c3f0592267
commit 0c83f23272
2 changed files with 23 additions and 8 deletions

View file

@ -1,3 +1,8 @@
Fri Sep 2 23:51:08 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (f_arg): f_norm_arg is a VALUE in ripper, not an ID.
fixed: [ruby-dev:26942]
Thu Sep 1 17:11:25 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_call0): wrong condition for $SAFE restoration.

18
parse.y
View file

@ -4095,15 +4095,25 @@ f_norm_arg : tCONSTANT
f_arg : f_norm_arg
{
$$ = rb_ary_new3(1, ID2SYM($1));
/*%%%*/
VALUE arg = ID2SYM($1);
/*%
VALUE arg = $1;
%*/
$$ = rb_ary_new3(1, arg);
}
| f_arg ',' f_norm_arg
{
/*%%%*/
VALUE arg = ID2SYM($3);
/*%
VALUE arg = $3;
%*/
$$ = $1;
if (rb_ary_includes($$, ID2SYM($3))) {
yyerror("duplicated argument name");
if (rb_ary_includes($$, arg)) {
yyerror("duplicated argument arg");
}
rb_ary_push($$, ID2SYM($3));
rb_ary_push($$, arg);
}
;