xxxxxxxxxx
arr = ["one", "two", "three", "four", "five"]
Hash[(0...arr.size).zip arr]
# => {0=>"one", 1=>"two", 2=>"three", 3=>"four", 4=>"five"}
xxxxxxxxxx
# array = [["a", 1], ["b", 2], ["c", 3]]
array = [[:a, 1], [:b, 2], [:c, 3]]
# convert array to hash
hash = Hash[array]
puts hash
# Stdout/output:
# {:a=>1, :b=>2, :c=>3}