From: Benoit Daloze Date: 2011-04-09T23:18:28+09:00 Subject: [ruby-core:35676] Re: [Ruby 1.9 - Feature #4539][Assigned] Array#zip_with Hi, On 9 April 2011 10:29, Kenta Murata wrote: > Hi, > > I implemented the features in C, and wrote tests for them. > Please see the following diffs: > https://github.com/mrkn/ruby/commit/9c7ead0e385b6a17dafa5bc8b4389e1baf2e3040 Thank you, nice diff. It would be nice to add the two examples from Michael Kohl: [1,2,3].zip([6,5,4], :+) #=> [7, 7, 7] [1,2,3].zip([6,5,4]) { |a,b| 3*a+2*b } #=> [15, 16, 17] And of course do the same for Enumerable#zip. Just a quick notice: in the tests, the arguments are reversed (it is assert_equal(expected, actual, msg = nil)). It is always hard to remember with test/unit, that is a reason why I prefer the spec syntax in general. It is definitely just a detail, but it could mislead someone reading a failing test.