summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 20:37:36 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 20:37:36 +0000
commitb09f1c5d6ccd7cde63adb901d6483dde448be829 (patch)
tree5ca2ab7a9a004a642d8d5b4e9ff2ba3c35d659ef /parse.y
parent08a04c815393dccd908a9310428a1a5caa7a8901 (diff)
merge revision(s) 14313:
* 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_6@16996 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 e1b9c1d..33db814 100644
--- a/parse.y
+++ b/parse.y
@@ -2343,6 +2343,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);
}