diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-30 04:27:41 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-30 04:27:41 +0000 |
| commit | 9328cf57a096563eebc512a71a314b3a3dd4e02e (patch) | |
| tree | 114fa47e46066a829a1bf09fbeb158b6f5686efd /parse.y | |
| parent | 91541f4c4e97c7b329c997d03501a7ce7310de7f (diff) | |
| download | ruby-9328cf57a096563eebc512a71a314b3a3dd4e02e.tar.gz ruby-9328cf57a096563eebc512a71a314b3a3dd4e02e.tar.xz ruby-9328cf57a096563eebc512a71a314b3a3dd4e02e.zip | |
* eval.c (rb_f_send): do not call private methods if the receiver
is specified. [ruby-talk:153672]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -4186,7 +4186,14 @@ f_block_arg : blkarg_mark tIDENTIFIER yyerror("block argument must be local variable"); else if (!dyna_in_block() && local_id($2)) yyerror("duplicated block argument name"); - $$ = dyna_in_block() ? assignable($2, 0) : NEW_BLOCK_ARG($2); + if (dyna_in_block()) { + shadowing_lvar($2); + dyna_var($2); + $$ = assignable($2, 0); + } + else { + $$ = NEW_BLOCK_ARG($2); + } /*% $$ = $2; %*/ |
