From cc441b33d8b613831d06f3dd620cb5b73f79909b Mon Sep 17 00:00:00 2001 From: HoneyryderChuck Date: Wed, 6 Sep 2023 22:52:19 +0100 Subject: [PATCH] force variable that may be nil to array for Array#& --- lib/httpx/io/tcp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/httpx/io/tcp.rb b/lib/httpx/io/tcp.rb index a459157c..1ea2c2d5 100644 --- a/lib/httpx/io/tcp.rb +++ b/lib/httpx/io/tcp.rb @@ -200,7 +200,7 @@ module HTTPX resolver_addresses = Resolver.nolookup_resolve(@hostname) - (resolver_addresses & @addresses).empty? + (Array(resolver_addresses) & @addresses).empty? end # :nocov: