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.
In case the reason you need to do this is because your data originally came from JSON, you could skip any of this parsing by just passing in the :symbolize_names option upon ingesting JSON.
:symbolize_names
No Rails required and works with Ruby >1.9
JSON.parse(my_json, :symbolize_names => true)