>>>>> "T" == TAKAHASHI Masayoshi <maki / rubycolor.org> writes:

T>   i = 0
T>   foo.each{|i|  ## <= warning
T>     .....


T> GOTO Kentaro doubted if it is not the rare conditions, but Matz
T> thinks that the frequency is not much for the risk, so it will
T> be implemented.

 Well, because I've a modified version which test this, here the result for
 the scripts in the distribution of ruby

 I've removed test.rb (which is probably a special case)

pigeon% for i in `ls **/*.rb`
for> do
for> ruby -c $i | grep -v OK
for> done
ext/syslog/test.rb:69: warning: shadowing variable `param'
ext/tk/lib/tk.rb:1420: warning: shadowing variable `elem'
ext/tk/lib/tk.rb:1531: warning: shadowing variable `conf'
ext/tk/lib/tk.rb:1590: warning: shadowing variable `conf'
ext/tk/lib/tk.rb:3718: warning: shadowing variable `slot'
ext/tk/lib/tk.rb:3718: warning: shadowing variable `value'
lib/cgi-lib.rb:173: warning: shadowing variable `x'
lib/cgi-lib.rb:187: warning: shadowing variable `x'
lib/debug.rb:328: warning: shadowing variable `b'
lib/debug.rb:614: warning: shadowing variable `n'
lib/debug.rb:804: warning: shadowing variable `th'
lib/fileutils.rb:303: warning: shadowing variable `dir'
lib/fileutils.rb:433: warning: shadowing variable `r'
lib/fileutils.rb:434: warning: shadowing variable `w'
lib/getopts.rb:108: warning: shadowing variable `opt'
lib/getopts.rb:108: warning: shadowing variable `val'
lib/getopts.rb:111: warning: shadowing variable `opt'
lib/getopts.rb:111: warning: shadowing variable `val'
lib/matrix.rb:598: warning: shadowing variable `i'
lib/matrix.rb:657: warning: shadowing variable `i'
lib/mkmf.rb:300: warning: shadowing variable `dir'
lib/net/http.rb:732: warning: shadowing variable `res'
lib/net/http.rb:751: warning: shadowing variable `res'
lib/net/protocol.rb:613: warning: shadowing variable `line'
lib/net/protocol.rb:668: warning: shadowing variable `i'
lib/net/protocol.rb:683: warning: shadowing variable `i'
lib/optparse.rb:85: warning: shadowing variable `k'
lib/optparse.rb:85: warning: shadowing variable `v'
lib/optparse.rb:240: warning: shadowing variable `s'
lib/optparse.rb:241: warning: shadowing variable `s'
lib/optparse.rb:255: warning: shadowing variable `s'
lib/optparse.rb:257: warning: shadowing variable `s'
lib/optparse.rb:414: warning: shadowing variable `o'
lib/optparse.rb:415: warning: shadowing variable `o'
lib/optparse.rb:416: warning: shadowing variable `o'
lib/optparse.rb:418: warning: shadowing variable `o'
lib/optparse.rb:911: warning: shadowing variable `o'
lib/optparse.rb:943: warning: shadowing variable `o'
lib/optparse.rb:1065: warning: shadowing variable `arg'
lib/optparse.rb:1145: warning: shadowing variable `arg'
lib/optparse.rb:1189: warning: shadowing variable `el'
lib/optparse.rb:1209: warning: shadowing variable `k'
lib/optparse.rb:1235: warning: shadowing variable `opt'
lib/optparse.rb:1368: warning: shadowing variable `s'
lib/racc/parser.rb:194: warning: shadowing variable `tok'
sample/cal.rb:40: warning: shadowing variable `d'
sample/cal.rb:110: warning: shadowing variable `m'
sample/philos.rb:50: warning: shadowing variable `i'
sample/test.rb:105: warning: shadowing variable `a'
[...]
sample/test.rb:991: warning: shadowing variable `i'
win32/resource.rb:53: warning: shadowing variable `icons'
pigeon% 


 Some of these shadowings are volontary.


Guy Decoux