diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 03:01:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 03:01:43 +0000 |
commit | f9f129ce0ddc3c73d5b1d0c4d8a9ad551fe4ee83 (patch) | |
tree | fc5682a9533fa502b02a73cdd50dccf1016a9737 /parse.y | |
parent | cfcde86709dd597b060d707e52bbb02678955120 (diff) |
* parse.y (f_rest_arg): check if duplicated. [ruby-core:14140]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2339,6 +2339,8 @@ f_rest_arg : restarg_mark tIDENTIFIER { if (!is_local_id($2)) yyerror("rest argument must be local variable"); + else if (local_id($2)) + yyerror("duplicate rest argument name"); if (dyna_in_block()) { rb_dvar_push($2, Qnil); } |