]> git.openstreetmap.org Git - rails.git/blobdiff - lib/locale.rb
Merge remote-tracking branch 'upstream/pull/3301'
[rails.git] / lib / locale.rb
index 56d3985760f8447455bcf93f7dd181fd949d60a3..5931301b5af6bf46f3291aa1b86418226b6b6857 100644 (file)
@@ -17,7 +17,7 @@ class Locale < I18n::Locale::Tag::Rfc4646
     def expand
       List.new(reverse.each_with_object([]) do |locale, expanded|
                  locale.candidates.uniq.reverse_each do |candidate|
     def expand
       List.new(reverse.each_with_object([]) do |locale, expanded|
                  locale.candidates.uniq.reverse_each do |candidate|
-                   expanded << candidate if candidate == locale || !expanded.include?(candidate)
+                   expanded << candidate if candidate == locale || expanded.exclude?(candidate)
                  end
                end.reverse.uniq)
     end
                  end
                end.reverse.uniq)
     end