Thanks a lot.

All of the three solution taught me something. I think i'll go with
.map.with_index. That looks concise.

Thanks again.