summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-01 06:47:47 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-01 06:47:47 +0000
commitc7d499225b4d035c17acf774a3d53e20d6301df7 (patch)
treee75ab42ee208290c1c4123178f1f8317f1fb3175 /parse.y
parent11fef7fd630528ac1b6c55739cb1affb2208944c (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y22
1 files changed, 17 insertions, 5 deletions
diff --git a/parse.y b/parse.y
index 7b47c7f6ed..d0cdbffb14 100644
--- a/parse.y
+++ b/parse.y
@@ -861,14 +861,14 @@ opt_call_args : none
| call_args opt_nl
call_args : command_call
- {
- value_expr($1);
- $$ = NEW_LIST($1);
- }
| args ','
{
$$ = $1;
}
+ | args ',' command_call
+ {
+ $$ = list_append($1, $3);
+ }
| args opt_block_arg
{
$$ = arg_blk_pass($1, $2);
@@ -1592,7 +1592,19 @@ f_args : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
f_norm_arg : tCONSTANT
{
- yyerror("formal argument must not be constant");
+ yyerror("formal argument cannot be a constant");
+ }
+ | tIVAR
+ {
+ yyerror("formal argument cannot be an instance variable");
+ }
+ | tGVAR
+ {
+ yyerror("formal argument cannot be a global variable");
+ }
+ | tCVAR
+ {
+ yyerror("formal argument cannot be a class variable");
}
| tIDENTIFIER
{