Skip to content

Commit 84a5137

Browse files
mpokrywkaphoet
andauthored
Do not modify config returned by Resolv::DNS::Config (#306)
* Do not modify config returned by Resolv::DNS::Config * Update lib/valid_email2/dns.rb --------- Co-authored-by: Peter Schröder <[email protected]>
1 parent dec511f commit 84a5137

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/valid_email2/dns.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def fetch(domain, type)
6464

6565
def resolv_config
6666
config = Resolv::DNS::Config.default_config_hash
67-
config[:nameserver] = @dns_nameserver if @dns_nameserver
67+
# REM: resolv gem 0.6.1 on linux can return frozen hash
68+
config = config.merge(nameserver: @dns_nameserver) if @dns_nameserver
6869
config
6970
end
7071
end

0 commit comments

Comments
 (0)