Is the doc. in error (maybe superceded by change in "do" semantics?) or
am i just reading this wrong:


>The difference between do and braces are: 
.
.
.
>     Braces introduce the nested local scopes, that is newly declared local variables in the >braces are valid only in the blocks. For example: 
>
>             foobar {
>               i = 20                # local variable `i' declared in the block.
>               ...
>             }
>             print defined? i        # `i' is not defined here.     
>             foobar a, b { .. }      # it is not valid outside of the block


Therefore, i thought this would be ok:

#!/usr/bin/ruby

%w{ abc def ghi }.each do |s|
   sn = s
end

p sn


But the output is:

/home/craig/ruby/tst.rb:7: undefined local variable or method `sn' for
#<Object:0x40247c90> (NameError)