From: Dave Thomas Date: 2001-02-27T15:10:36+09:00 Subject: [ruby-talk:11661] Re: RCR: shortcut for instance variable initialization ts writes: > >>>>> "D" == Dave Thomas writes: > > D> [1, 2, 3].each {|@i| } > D> p @i #=> 3 > > D> Here the formal arguments to a block affect non-locals. It seemed > D> analogous. > > It seems, but with |@i| this a multi-assignement (NODE_MASGN) and this is > not the case with def() Clearly so, but ignoring the current implementation, from the outside you could consider them similar situations. In both cases, assignment to a 'parameter' affects external state. In the limited case of allowing instance variables as parameters to initialize, that seems to be a fairly simple and contained extension. Dave