]> git.openstreetmap.org Git - rails.git/blobdiff - lib/locale.rb
Merge pull request #5056 from AntonKhorev/diary-og-description
[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|
-                   expanded << candidate if candidate == locale || !expanded.include?(candidate)
+                   expanded << candidate if candidate == locale || expanded.exclude?(candidate)
                  end
                end.reverse.uniq)
     end