lib/countries/country/finder_methods.rb in countries-5.7.2 vs lib/countries/country/finder_methods.rb in countries-6.0.0
- old
+ new
@@ -1,10 +1,10 @@
# frozen_string_literal: true
module ISO3166
module CountryFinderMethods
- FIND_BY_REGEX = /^find_(all_)?(country_|countries_)?by_(.+)/.freeze
- SEARCH_TERM_FILTER_REGEX = /\(|\)|\[\]|,/.freeze
+ FIND_BY_REGEX = /^find_(all_)?(country_|countries_)?by_(.+)/
+ SEARCH_TERM_FILTER_REGEX = /\(|\)|\[\]|,/
def search(query)
country = new(query.to_s.upcase)
country&.valid? ? country : nil
end