Hi all,

how can i access the index of the element inside the map argument block?

"101010,234,876".split(",").map {|c| get_something(c)}

this works. But the problem is i need to apply the get_something on only the
second and third element of the array. How can I check the index of the
element inside the map block?


Note :

I'm pretty new to ruby (just a month). So, this might be a pretty obvious
question.

- siddharth