Skip to content

Commit 56ab6ea

Browse files
committed
Call Resolv::DNS::Config#lazy_initialize explicitly if that instance is not initialized
1 parent a7a376c commit 56ab6ea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/resolv.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ def each_address(name)
403403
end
404404

405405
def use_ipv6? # :nodoc:
406+
@config.lazy_initialize unless @config.instance_variable_get(:@initialized)
407+
406408
use_ipv6 = @config.use_ipv6?
407409
unless use_ipv6.nil?
408410
return use_ipv6

0 commit comments

Comments
 (0)