summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-19 03:01:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-19 03:01:43 +0000
commitf9f129ce0ddc3c73d5b1d0c4d8a9ad551fe4ee83 (patch)
treefc5682a9533fa502b02a73cdd50dccf1016a9737 /parse.y
parentcfcde86709dd597b060d707e52bbb02678955120 (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.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 414c775fd1..e93148ff9e 100644
--- a/parse.y
+++ b/parse.y
@@ -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);
}