From: gotoken@... (GOTO Kentaro) Date: 2001-03-12T14:39:52+09:00 Subject: [ruby-talk:12452] Re: FEATURE REQUEST: 'my' local variables In message "[ruby-talk:12289] Re: FEATURE REQUEST: 'my' local variables" on 01/03/09, Yukihiro Matsumoto writes: >First, I will not introduce "my" as a keyword to Ruby. > >I'm thinking of something like > > loop { > ... > } > >that declares block parameters a, b, c, and new local variables d, e, >f, effective within the block, regardless of existence of outer >variables of same names. Shadowing outer variables is allowed but you >will be warned (it's bad habit anyway). May I show yet another syntax? loop {|a, b, c; d, e| ... } This might have an advantage that the usual form can be seen as a special case of this form. I have not considerd about possibility of implementation, sorry. -- Gotoken