Hi --

On Wed, 12 Feb 2003, Patrick Logan wrote:

> I read recently a flaw I did not previously know about...
>
> "Blocks (closures) in Ruby do not introduce a new scope, only methods
> do.
> This is generally acknowledged as a flaw by the Ruby community but is
> left
> in for backwards compatibility.  For example:
>
> x = 0
> [1,2,3].each{|x| print x}
> #x now equals 3"
>
> Of course this is just wrong. I am hoping no one expects an
> implementation of Ruby to actually behave this way.
>
> Is it generally accepted that programs should not expect this? I would
> not be ashamed to break this code in a new implementation of Ruby.

Let us know if you need help choosing a name for your new language :-)


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav