Rails uses ActiveSupportsHashWithIndifferentAccess for almost all hashes that come from within, for example params. A HashWithIndifferentAccessbehaves just like a regular hash, except for accessing keys by character, or a string of the same "value" returns the same value of the hash function. For instance:
h = HashWithIndifferentAccess.new
h[:foo] = 'bar'
h[:foo]
h['foo']
h['foo'] = 'BAR'
h[:foo]
against. normal hash:
h = {}
h[:foo] = 'bar'
h[:foo]
h['foo']
h['foo'] = 'BAR'
h[:foo]
This allows you not to worry (for better or for worse) about whether a particular key was a character or string.