diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-01 06:47:47 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-01 06:47:47 +0000 |
| commit | 70f141e112b62e985e86edc4a51c1f81131182fe (patch) | |
| tree | e75ab42ee208290c1c4123178f1f8317f1fb3175 /parse.y | |
| parent | ccc13a951331813baaedf8ce04e49e05d0863d14 (diff) | |
| download | ruby-70f141e112b62e985e86edc4a51c1f81131182fe.tar.gz ruby-70f141e112b62e985e86edc4a51c1f81131182fe.tar.xz ruby-70f141e112b62e985e86edc4a51c1f81131182fe.zip | |
matz
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -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 { |
