Paul Carvalho wrote:
> This is one of those times when I'll never understand why some things 
> in programming start counting at 1 and some things start counting at 0.
This is largely because Watir is stupid in this area. We made a bad 
design choice with Watir 1.0. We'd now like to make Watir consistent and 
start with 0 everywhere (like everything else in Ruby) but this would 
raise compatibility issues. We welcome your thoughts in this area.
> I, too, have several similar loops in some of my scripts, but I opted 
> for the more readable format of saying:
>
> t.length.times { |x|
>     puts t[x][0]
> }
Another way to say this is:

  t.each {|x| puts x[0]}

Bret
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to