]> git.openstreetmap.org Git - rails.git/blobdiff - test/lib/i18n_test.rb
Merge remote-tracking branch 'upstream/pull/3791'
[rails.git] / test / lib / i18n_test.rb
index 1d4557c1ae3c5d081ca6fbd4e6f0e5b398703186..9c7d8e568347625a5c8d58291c4a028afe3c7769 100644 (file)
@@ -63,13 +63,14 @@ class I18nTest < ActiveSupport::TestCase
     I18n.t(scope || ".", :locale => I18n.default_locale).map do |key, value|
       scoped_key = scope ? "#{scope}.#{key}" : key
 
     I18n.t(scope || ".", :locale => I18n.default_locale).map do |key, value|
       scoped_key = scope ? "#{scope}.#{key}" : key
 
-      if value.is_a?(Hash)
+      case value
+      when Hash
         if value.keys - plural_keys == []
           scoped_key
         else
           translation_keys(scoped_key)
         end
         if value.keys - plural_keys == []
           scoped_key
         else
           translation_keys(scoped_key)
         end
-      elsif value.is_a?(String)
+      when String
         scoped_key
       end
     end.flatten
         scoped_key
       end
     end.flatten