From: Brian Candler Date: 2010-12-26T19:28:54+09:00 Subject: Re: array index inside map function You can make this work in 1.8.7 too: >> ["x","y","z"].each_with_index.map { |x| x } => [["x", 0], ["y", 1], ["z", 2]] -- Posted via http://www.ruby-forum.com/.