>>>>> "B" == =?ISO-8859-1?Q?Brian Schr=F6der?= <ISO-8859-1> writes:

B> Or in simple cases where the additional memory overhead is not
B> important, you can also use the zip funtion. I.e.

B> %w(eins zwei drei).zip([1,2,3]).each do | name, value |
B>   puts "The value of #{name} is #{value}"
B> end

 Why do you use #each ?

svg% ruby -e '%w(eins zwei drei).zip([1,2,3]) {|a, b| puts "#{a} #{b}" }'
eins 1
zwei 2
drei 3
svg% 

 no memory overhead


Guy Decoux