summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
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
{