Revert "Simplify method chain (use 'map.with_index')"

This reverts commit a1f0a00b65ca9394e7a2071c6a2d6384cbe43e44.

It doesn't compatible with 1.8.7, ree, rbx-18mode, jruby-18mode.