What is the easiest way to convert a ruby array to an array of consecutive pairs of its elements?
I mean:
x = [:a, :b, :c, :d]
Expe
Hash[*[:a, :b, :c, :d]].to_a