* parse.y (f_norm_arg): check also nested arguments. [ruby-dev:31502]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-08-23 04:19:45 +00:00
parent fb56832daf
commit fcab7ebb71
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Thu Aug 23 13:19:43 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (f_norm_arg): check also nested arguments. [ruby-dev:31502]
Thu Aug 23 00:06:48 2007 Yukihiro Matsumoto <matz@ruby-lang.org> Thu Aug 23 00:06:48 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* util.c: updated for ANSI C only. applied a patch from * util.c: updated for ANSI C only. applied a patch from

View File

@ -4154,6 +4154,7 @@ f_norm_arg : tCONSTANT
} }
| tIDENTIFIER | tIDENTIFIER
{ {
shadowing_lvar($1);
$$ = $1; $$ = $1;
} }
; ;
@ -4163,7 +4164,6 @@ f_arg_item : f_norm_arg
/*%%%*/ /*%%%*/
if (!is_local_id($1)) if (!is_local_id($1))
yyerror("formal argument must be local variable"); yyerror("formal argument must be local variable");
shadowing_lvar($1);
arg_var($1); arg_var($1);
$$ = NEW_ARGS_AUX($1, 1); $$ = NEW_ARGS_AUX($1, 1);
/*% /*%