What is the most Ruby-like way to convert from Array like [:one, 1, :two, 2] to Hash like {:one => 1, :two => 2} ?
Array
[:one, 1, :two, 2]
Hash
{:one => 1, :two => 2}
Here is how I would do it:
Hash[*array]
Hash[*[:one, 1, :two, 2]] #=> {:one => 1, :two => 2}