ThoML
7/14/2008 8:35:00 PM
> orderlist = products.zip(quantity)
If you don't want to create a new array but work on the values you
could also use an iterator/enumerator.
quant_enum = quantity.enum_for
products.each {|prod| do_something(prod, quant_enum.next)}
I don't know though if this performs better/worse than #zip or
#each_with_index as proposed above/below.