lib/validators/tld.rb in validators-2.6.0 vs lib/validators/tld.rb in validators-2.7.0
- old
+ new
@@ -5,10 +5,10 @@
def self.all
@tld ||= JSON.load(File.read(FILE_PATH))
end
def self.host_with_valid_tld?(host)
- return false if host.split('.').size == 1
+ return false if host.split(".").size == 1
valid? host[/\.([^.]+)$/, 1].to_s.downcase
end
def self.valid?(tld)
all.include?(tld)