Open joallard opened 12 years ago
You could always use HashWithIndifferentAccess
from the ActiveSupport library, by calling with_indifferent_access
:
require 'active_support/core_ext/hash'
Psych.load("---\n ananas: sweet\n bananas: yellow").with_indifferent_access
@kendagriff
It won't automagically convert folded hashes into HashWithIndifferentAccess
foo:
bar:
hello:
world: "yeah"
This is a feature request. I like symbols. An argument could be made about object duplication and so on, but I just like them because they are easier to type. It would be nice to have an option to parse hash keys as symbols.
For example: