Okay so here\'s the deal, I\'ve been googling for ages to find a solution to this and while there are many out there, they don\'t seem to do the job I\'m looking for.
Ba
Just use Hash.[] with the values in the array. For example:
Hash.[]
arr = [1,2,3,4] Hash[*arr] #=> gives {1 => 2, 3 => 4}