diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-28 08:25:05 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-28 08:25:05 +0000 |
| commit | 1e36d7f1b1cc40763a9994f8510df89467e9fa15 (patch) | |
| tree | f8890740f0c0e7ef87892f1d0eb91225eb417915 | |
| parent | 20cf09e2c4da1eda1c53dc559a05127e5516594c (diff) | |
| download | ruby-1e36d7f1b1cc40763a9994f8510df89467e9fa15.tar.gz ruby-1e36d7f1b1cc40763a9994f8510df89467e9fa15.tar.xz ruby-1e36d7f1b1cc40763a9994f8510df89467e9fa15.zip | |
* parse.y (f_larglist): allow block argument in lambda parameter
list without parenthesis.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | parse.y | 16 |
2 files changed, 13 insertions, 8 deletions
@@ -1,3 +1,8 @@ +Thu Jul 28 17:23:37 2005 Yukihiro Matsumoto <matz@ruby-lang.org> + + * parse.y (f_larglist): allow block argument in lambda parameter + list without parenthesis. + Thu Jul 28 17:14:01 2005 Yukihiro Matsumoto <matz@ruby-lang.org> * hash.c (each_i): typo fixed. [ruby-dev:26622] @@ -3200,34 +3200,34 @@ f_larglist : '(' f_args opt_bv_decl rparen $$ = dispatch1(paren, $2); %*/ } - | f_arg opt_bv_decl + | f_arg opt_f_block_arg opt_bv_decl { /*%%%*/ - $$ = NEW_LAMBDA(new_args($1, 0, 0, 0), $2); + $$ = NEW_LAMBDA(new_args($1, 0, 0, $2), $3); /*% $$ = dispatch4(params, $1, Qnil, Qnil, Qnil); %*/ } - | f_arg ',' f_rest_arg opt_bv_decl + | f_arg ',' opt_f_block_arg f_rest_arg opt_bv_decl { /*%%%*/ - $$ = NEW_LAMBDA(new_args($1, 0, $3, 0), $4); + $$ = NEW_LAMBDA(new_args($1, 0, $3, $4), $5); /*% $$ = dispatch4(params, $1, Qnil, $3, Qnil); %*/ } - | f_rest_arg opt_bv_decl + | f_rest_arg opt_f_block_arg opt_bv_decl { /*%%%*/ - $$ = NEW_LAMBDA(new_args(0, 0, $1, 0), $2); + $$ = NEW_LAMBDA(new_args(0, 0, $1, $2), $3); /*% $$ = dispatch4(params, Qnil, Qnil, $1, Qnil); %*/ } - | opt_bv_decl + | opt_f_block_arg opt_bv_decl { /*%%%*/ - $$ = NEW_LAMBDA(new_args(0, 0, 0, 0), $1); + $$ = NEW_LAMBDA(new_args(0, 0, 0, $1), $2); /*% $$ = dispatch4(params, Qnil, Qnil, Qnil, Qnil); %*/ |
