From: Urabe Shyouhei Date: 2010-12-26T18:02:17+09:00 Subject: Re: array index inside map function (2010/12/26 17:47), Peter Vandenabeele wrote: > There is each_with_index, but that has the "each" functionality > and not the "map"/"collect" functionality. Why not use Ruby 1.9? irb(main):001:0> ["x", "y", "z"].map.with_index {|i, j| [i, j] } => [["x", 0], ["y", 1], ["z", 2]]