Hi,

In message "Re: Specifying local and external block parameters (that old chestnut)"
    on 02/10/06, ts <decoux / moulon.inra.fr> writes:

|Y>   * variables assigned by ":=" should be local to the block (or
|Y>     possibly local to the nearest compound statements).
|
| What it will do with ?
|
|   b = 12
|   2.times do |i|
|      b = i
|      # ...
|      b := i
|   end
|   p b
|
| the result is `12' or `1'

"1", with warning.

   b = 12
   2.times do |i|
      b = i             # assignment to the outer b
      # ...
      b := i            # creation of inner b, gives shadowing warning
   end
   p b

							matz.