From: matz@... (Yukihiro Matsumoto) Date: 2002-10-08T18:38:53+09:00 Subject: Re: Specifying local and external block parameters (that old chestnut) Hi, In message "Re: Specifying local and external block parameters (that old chestnut)" on 02/10/08, Mauricio Fern�ndez writes: |i = 0 |x = 'some value' |(0...10).each do |i| | x := 'surprise!' if i == 2 | x = i # uses local after the := is run |end | |x => 1 | |Having 'x = ...' meaning completely different things depending on the |"execution context" makes me feel unsecure. They are not "completely different". Think about the following C code: int foo() { int a a = 42; printf("a=%d\n", a); { int a; a = 55 printf("a=%d\n", a); } printf("a=%d again\n", a); } This is somewhat confusing but completely valid code in C. Besides, in (future) Ruby, you will be warned for a bad style. matz.