You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expect I18n.exists?(nil) to throw I18n::ArgumentError or return false
What actually happened
It returns true
Versions of i18n, rails, and anything else you think is necessary
The issue seems to come from this line.
Is there a specific reason why the line only checks if key is empty when it's string, instead of doing raise I18n::ArgumentError if !key.is_a?(String) || key.empty?
The text was updated successfully, but these errors were encountered:
What I tried to do
Using
I18n.exists?(key)
when the key is nilWhat I expected to happen
Expect
I18n.exists?(nil)
to throwI18n::ArgumentError
or return falseWhat actually happened
It returns true
Versions of i18n, rails, and anything else you think is necessary
The issue seems to come from this line.
Is there a specific reason why the line only checks if key is empty when it's string, instead of doing
raise I18n::ArgumentError if !key.is_a?(String) || key.empty?
The text was updated successfully, but these errors were encountered: