Skip to content

Commit

Permalink
Call Resolv::DNS::Config#lazy_initialize explicitly if that instance …
Browse files Browse the repository at this point in the history
…is not initialized
  • Loading branch information
hsbt committed Oct 8, 2024
1 parent 89da313 commit 712a977
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/resolv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ def each_address(name)
end

def use_ipv6? # :nodoc:
@config.lazy_initialize unless @config.instance_variable_get(:@initialized)

use_ipv6 = @config.use_ipv6?
unless use_ipv6.nil?
return use_ipv6
Expand Down

0 comments on commit 712a977

Please sign in to comment.