Hash is beautiful. It is one of many things why I love Ruby. As you might have known,
Hash is identified by a key, this key could be either a String or a Symbol. For most
of cases, people tend to go for symbol because it would take up less memory (though it
might come with a side effect that is Symbol is not GC-colletable (Ruby 2.2.0 does clean
it up though)).
There are access usecases that requires our hash key to be interchangable between String and Symbol
key. For example, web application request parameter processing.
We could typecast the key to either String or Symbol but it would soon emerge an
annoying pattern. Instead, with the help of ActiveSupport, you can create a hash with
no differences if accessing using String or Symbol key. Introducing ActiveSupport::HashWithIndifferentAccess.