hash.each_with_index do |(key, value), index| # ... end
X.each_with_index do |item, index| puts "current_index: #{index}" end