Ruby script showing usage of each_with_index