summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-13 09:15:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-13 09:15:46 +0000
commit844e89897c44a6c3486b27497e3df015e42813cf (patch)
tree97b96ee9153d244b65645ecb6547676c8e87e36d /parse.y
parent13adec97c9c4ad2aa8ea3edfd9c65710b703f51f (diff)
2000-03-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 4b3e4c7729..ff94cca7b2 100644
--- a/parse.y
+++ b/parse.y
@@ -1544,7 +1544,11 @@ f_args : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
$$ = NEW_ARGS(0, 0, -1);
}
-f_norm_arg : tIDENTIFIER
+f_norm_arg : tCONSTANT
+ {
+ yyerror("formal argument must not be constant");
+ }
+ | tIDENTIFIER
{
if (!is_local_id($1))
yyerror("formal argument must be local variable");