From 213fa728ea206d6f27fb22523e2c227564831209 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 7 Jan 2016 09:10:19 +0000 Subject: [PATCH] Discard and locale tags that fail to parse --- lib/locale.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/locale.rb b/lib/locale.rb index bb09ae327..e10f06632 100644 --- a/lib/locale.rb +++ b/lib/locale.rb @@ -3,7 +3,7 @@ class Locale < I18n::Locale::Tag::Rfc4646 attr_reader :locales def initialize(tags) - super(tags.map { |tag| Locale.tag(tag) }) + super(tags.map { |tag| Locale.tag(tag) }).compact! end def candidates(preferred) -- 2.43.2