lib/whois/parsers/whois.dot.cf.rb in whois-parser-1.2.0 vs lib/whois/parsers/whois.dot.cf.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' @@ -41,26 +41,26 @@ end property_supported :created_on do if content_for_scanner =~ /Domain registered:\s(.+)\n/ - Time.strptime($1, "%m/%d/%Y") + Time.strptime(::Regexp.last_match(1), "%m/%d/%Y") end end property_not_supported :updated_on property_supported :expires_on do if content_for_scanner =~ /Record will expire on:\s(.+)\n/ - value = $1.strip + value = ::Regexp.last_match(1).strip Time.strptime(value, "%m/%d/%Y") if value.present? end end property_supported :nameservers do if content_for_scanner =~ /Domain Nameservers:\n((.+\n)+)\s+\n/ - $1.split("\n").map do |name| + ::Regexp.last_match(1).split("\n").map do |name| Parser::Nameserver.new(name: name.strip.downcase) end end end