Skip to content
Merged

Fixes #207

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dnsruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ SPEC = Gem::Specification.new do |s|
stub resolver. It aims to comply with all DNS RFCs, including
DNSSEC NSEC3 support.'
s.license = "Apache License, Version 2.0"


# Add explicit Ruby version requirement
s.required_ruby_version = '>= 2.8.0'

s.files = `git ls-files -z`.split("\x0")

s.post_install_message = \
Expand Down
5 changes: 0 additions & 5 deletions lib/dnsruby/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,6 @@ def Config.parse_resolv_conf(filename) #:nodoc: all
f.each {|line|
line.sub!(/[#;].*/, '')
keyword, *args = line.split(/\s+/)
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.8")
args.each { |arg|
arg.untaint
}
end
next unless keyword
case keyword
when 'port'
Expand Down
7 changes: 0 additions & 7 deletions lib/dnsruby/hosts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,12 @@ def lazy_initialize# :nodoc:
line.sub!(/#.*/, '')
addr, hostname, *aliases = line.split(/\s+/)
next unless addr
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.8")
addr.untaint
hostname.untaint
end
@addr2name[addr] = [] unless @addr2name.include? addr
@addr2name[addr] << hostname
@addr2name[addr] += aliases
@name2addr[hostname] = [] unless @name2addr.include? hostname
@name2addr[hostname] << addr
aliases.each {|n|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.8")
n.untaint
end
@name2addr[n] = [] unless @name2addr.include? n
@name2addr[n] << addr
}
Expand Down