Just Someone
2006-May-14 00:07 UTC
[Rails] Beware of HashWithIndifferentAccess#symbolize_keys!
Hi, 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 at: http://dev.rubyonrails.org/ticket/5076 I also posted a much longer explanation in my blog at: http://devblog.famundo.com/articles/2006/05/13/beware-of-hashwithindifferentaccess-symbolize_keys Please note that symbolize_keys (without the ! at the end) works as designed. Bye, Guy. -- Family management on rails: http://www.famundo.com - coming soon! My development related blog: http://devblog.famundo.com