Skip to content

Commit

Permalink
fix ruby 1.8 bug and make resolve stage stats available
Browse files Browse the repository at this point in the history
  • Loading branch information
squish committed Aug 8, 2011
1 parent 154b43a commit b8542b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions lib/dnstraverse/referral.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Referral
attr_reader :warnings, :children, :parent_ip
attr_reader :decoded_query_cache
attr_reader :responses
attr_reader :stats
attr_reader :stats, :stats_resolve
attr_accessor :replaced_by

EMPTY_ARRAY = [].freeze
Expand Down Expand Up @@ -486,9 +486,11 @@ def stats_display(args)
puts "Stopped at #{where})"
puts "#{indent}#{key}"
end
# downcase for symbols doesn't work with ruby 1.8 :-( remove for 1.9
if response.status != :answered and
((response.qname.downcase != @qname.downcase) or (response.qclass.downcase != @qclass.downcase) or
(response.qtype.downcase != @qtype.downcase)) then
((response.qname.downcase != @qname.downcase) or
(response.qclass.to_s.downcase != @qclass.to_s.downcase) or
(response.qtype.to_s.downcase != @qtype.to_s.downcase)) then
puts "#{indent}While querying #{response.qname}/" +
"#{response.qclass}/#{response.qtype}"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/dnstraverse/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module DNSTraverse
module Version
MAJOR = 0
MINOR = 1
PATCH = 3
PATCH = 4
STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
end
end

0 comments on commit b8542b2

Please sign in to comment.