>>>>> "B" == Brian Candler <B.Candler / pobox.com> writes:

B> Unfortunately, although I receive ruby-talk in digest form, there are some
B> weeks when I simply have to delete every day's mails. That's just how it
B> goes. I did read [52440], [63087] and [63100] though, and the terminology
B> was ambiguous to me. Does "shadowed" mean "aliased" or "hidden"?

 It's simple :

    * all variables are local except variables found between || which are
      block local

    * you have a warning (and shadowing) if a variable found between || was
      previously declared

 This give

   [0].each do |x|     # `x' block local variable
      a = x            # `a' local variable
      [1].each do |a|  # warning shadowing variable `a'
         # a = 1, x = 0
      end
      # a = 0, x = 0
      [2].each do |x|  # warning shadowing variable `x'
         # a = 0, x = 2
      end
      # a = 0, x = 0
   end
   # a = 0
   # undefined variable x



Guy Decoux