diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-21 08:08:36 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-21 08:08:36 +0000 |
| commit | 97ea999e0487a49b21b31cc40fff3aa0251b6bd9 (patch) | |
| tree | 60b46bd4507018b7c53ba2702d11119699c92779 /parse.y | |
| parent | b6257ecd86ddb5042bc6fbfde541b8df8c65db95 (diff) | |
| download | ruby-97ea999e0487a49b21b31cc40fff3aa0251b6bd9.tar.gz ruby-97ea999e0487a49b21b31cc40fff3aa0251b6bd9.tar.xz ruby-97ea999e0487a49b21b31cc40fff3aa0251b6bd9.zip | |
* parse.y (block_param): do not use multiple assignment for a sole
block parameter. [ruby-dev:28710]
* eval.c (rb_yield_0): pass a raw yielded value to a sole block
parameter if a value is passed by yield.
* eval.c (proc_invoke): args may not be an array.
* eval.c (rb_proc_yield): pass original value without wrapping
it in an array.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2900,7 +2900,13 @@ block_param0 : mlhs_item block_param : block_param0 { /*%%%*/ - $$ = NEW_MASGN($1, 0); + if ($1->nd_alen == 1) { + $$ = $1->nd_head; + rb_gc_force_recycle((VALUE)$1); + } + else { + $$ = NEW_MASGN($1, 0); + } /*% $$ = blockvar_new($1); %*/ |
