I would like to do a.each_with_object with index, in a better way than this:
a.each_with_object
index
a = %w[a b c] a.each.with_index.each_with_object({}) { |ar
You could replace your last line with
puts "i is: %d, v is %s" % arr.reverse
but, as @sawa suggested, disambiguating the array's argument is the thing to do here. I just mention this as something to be stored away for another day.