lib/whois/parsers/whois.nic.cl.rb in whois-parser-1.2.0 vs lib/whois/parsers/whois.nic.cl.rb in whois-parser-2.0.0
- old
+ new
@@ -1,11 +1,11 @@
#--
# Ruby Whois
#
# An intelligent pure Ruby WHOIS client and parser.
#
-# Copyright (c) 2009-2018 Simone Carletti <weppos@weppos.net>
+# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
#++
require_relative 'base'
@@ -33,11 +33,11 @@
:registered
end
end
property_supported :available? do
- !!(content_for_scanner =~ /^(.+?): no existe$/)
+ !!(content_for_scanner =~ /^(.+?): no existe$/)
end
property_supported :registered? do
!available?
end
@@ -55,13 +55,13 @@
property_not_supported :expires_on
property_supported :nameservers do
if content_for_scanner =~ /Servidores de nombre \(Domain servers\):\n((.+\n)+)\n/
- $1.split("\n").map do |line|
+ ::Regexp.last_match(1).split("\n").map do |line|
line.strip!
line =~ /(.+) \((.+)\)/
- Parser::Nameserver.new(:name => $1, :ipv4 => $2)
+ Parser::Nameserver.new(:name => ::Regexp.last_match(1), :ipv4 => ::Regexp.last_match(2))
end
end
end
end