From: dblack@... Date: 2002-11-19T00:25:56+09:00 Subject: Re: ruby-dev summary 18711-18810 Hi -- On Mon, 18 Nov 2002, Minero Aoki wrote: > # Enumerable#zip > for x,y in a.zip(b) do ... end > a.zip(b).each {|x,y| ...} > # Problem: If the length of a and b are different, > # which one should we choose? The default value/block does > # not resolve this problem, because it is equal to the > # "choose longest" strategy. Since a is the receiver, it would seem natural to me to have the zip'ping only go the length of a. Also -- separate point, but maybe related -- do we need "each"? What about: a.zip(b) {|x,y| ... } i.e., have zip itself iterate (rather than have to iterate through the returned array). David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav