What\'s the (fastest/cleanest/straightforward) way to convert all keys in a hash from strings to symbols in Ruby?
This would be handy when parsing YAML.
ruby-1.9.2-p180 :001 > h = {'aaa' => 1, 'bbb' => 2} => {"aaa"=>1, "bbb"=>2} ruby-1.9.2-p180 :002 > Hash[h.map{|a| [a.first.to_sym, a.last]}] => {:aaa=>1, :bbb=>2}