From: "sawa (Tsuyoshi Sawada)" Date: 2013-10-06T00:26:09+09:00 Subject: [ruby-core:57680] [ruby-trunk - Feature #8987] map/collect extension which handles arguments Issue #8987 has been updated by sawa (Tsuyoshi Sawada). =begin In case of commutative operations like `+`, you can do it like this: [1, 2, 3, 4].map(&4.method(:+)) # => [5, 6, 7, 8] =end ---------------------------------------- Feature #8987: map/collect extension which handles arguments https://bugs.ruby-lang.org/issues/8987#change-42299 Author: sowieso (So Wieso) Status: Open Priority: Normal Assignee: Category: core Target version: current: 2.1.0 Please consider extending map/collect by allowing additional arguments to be passed to proc, like: A: [1,2,3,4].map :+, 4 and/or B: [1,2,3,4].map 4, &:+ => [5, 6, 7, 8] Variant A is probably more readable. Variant B is more versatile (allows arbitrary arguments to be passed to block). -- http://bugs.ruby-lang.org/