svenfuchs/i18n — pull request #236 by jcstringer (2013-12-18 22:09:23+00:00)
Title: Nil errors

Based on the conversation in this previously filed issue https://github.com/svenfuchs/i18n/issues/207 I've taken a stab at preventing nil from being accepted as a key when calling the I18n.t method. These changes cause a I18n::ArgumentError to be raised, and I also added the same behavior on the exists? method which seemed appropriate.

As it turns out there were a lot of tests which passed in nil as the key so I had to make quite a few changes there. That led me to having to make a related change to the Fallbacks module which was explicitly sending a nil key to the t method. My change there was to just use the original key instead of nil, so I'd ask that the maintainers take a close look at that to make sure that doing so won't cause any other issues. Test suite is passing for me locally with these changes.