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.
How about this:
my_hash = HashWithIndifferentAccess.new(YAML.load_file('yml')) # my_hash['key'] => "val" # my_hash[:key] => "val"