Forum: Ruby on Rails Beware of HashWithIndifferentAccess#symbolize_keys!

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Just S. (Guest)
on 2006-05-14 04:08
(Received via mailing list)

I just posted a patch tot he rails trac for a bug we found where
running symbolize_keys! on a HashWithIndifferentAccess will delete all
items from the hash. Please make sure you either never call
symbolize_keys! (or to_options! which just alias it) on a
HashWithIndifferentAccess, or apply the path attached from the ticket

I also posted a much longer explanation in my blog at:

Please note that symbolize_keys (without the ! at the end) works as


This topic is locked and can not be replied to.