lib/whois/parser.rb in hetzner-whois-parser-1.0.1.rc1 vs lib/whois/parser.rb in hetzner-whois-parser-1.0.1.rc2

- old
+ new

@@ -97,10 +97,11 @@ # # => #<Whois::Parsers::Blank> # def self.parser_for(part) parser_klass(part.host).new(part) rescue LoadError + $stderr.puts "DEBUG: parser_for raised #{$!.inspect}" Parsers.const_defined?("Blank") || autoload("blank") Parsers::Blank.new(part) end # Detects the proper parser class according to given <tt>host</tt> @@ -145,10 +146,10 @@ # def self.host_to_parser(host) host.to_s.downcase. gsub(/[.-]/, '_'). gsub(/(?:^|_)(.)/) { $1.upcase }. - gsub(/\A(\d+)\z/) { "Host#{$1}" } + gsub(/\A(\d+)\z/) { "Host#{$1}" }.tap { |x| $stderr.puts "DEBUG: host_to_parser(#{host.inspect}) -> #{x.inspect}" } end # Requires the file at <tt>whois/parsers/#{name}</tt>. # # @param [String] name The file name to load.