X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4d2ea315168b8cdbb6b00e0c9bf3d9da30566f5f..735a5cf9e25b81d03db80ca4393aa34ea74d612a:/lib/locale.rb?ds=sidebyside diff --git a/lib/locale.rb b/lib/locale.rb index 56d398576..5931301b5 100644 --- a/lib/locale.rb +++ b/lib/locale.rb @@ -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