From: "prijutme4ty (Ilya Vorontsov)" Date: 2012-06-01T15:54:30+09:00 Subject: [ruby-core:45363] [ruby-trunk - Feature #6499] Array::zip Issue #6499 has been updated by prijutme4ty (Ilya Vorontsov). marcandre (Marc-Andre Lafortune) wrote: > Hi > > trans (Thomas Sawyer) wrote: > > This is probably true of any Array method that take one or more other arrays as argument. Are there other's besides #zip? > > I agree and would like `Array.product` to be considered as a worthy addition. Actually! I had such a problem with #product too, but have already forgotten about it. ---------------------------------------- Feature #6499: Array::zip https://bugs.ruby-lang.org/issues/6499#change-26949 Author: prijutme4ty (Ilya Vorontsov) Status: Assigned Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: Target version: Sometimes it's more natural to have Array::zip rather than Array#zip. Otherwise first array of list became unnecessary dedicated For example cols = first_row.zip(second_row,third_row,fourth_row) have more natural analog: cols = Array.zip(first_row,second_row,third_row,fourth_row) Implementation is obvious: def Array.zip(first,*rest) first.zip(*rest) end -- http://bugs.ruby-lang.org/