How to build a Ruby hash out of two equally-sized arrays? January 9, 2023 by Tarik h = Hash[a.zip b] # => {:baz=>1, :bof=>2, :bar=>"world", :foo=>"hello"} …damn, I love Ruby.