lib/httpx/options.rb in httpx-0.22.2 vs lib/httpx/options.rb in httpx-0.22.3
- old
+ new
@@ -13,11 +13,11 @@
READ_TIMEOUT = WRITE_TIMEOUT = REQUEST_TIMEOUT = Float::INFINITY
# https://github.com/ruby/resolv/blob/095f1c003f6073730500f02acbdbc55f83d70987/lib/resolv.rb#L408
ip_address_families = begin
list = Socket.ip_address_list
- if list.any? { |a| a.ipv6? && !a.ipv6_loopback? && !a.ipv6_linklocal? }
+ if list.any? { |a| a.ipv6? && !a.ipv6_loopback? && !a.ipv6_linklocal? && !a.ipv6_unique_local? }
[Socket::AF_INET6, Socket::AF_INET]
else
[Socket::AF_INET]
end
rescue NotImplementedError
@@ -98,10 +98,10 @@
attr_reader(optname)
end
def def_option(optname, *args, &block)
- if args.size.zero? && !block
+ if args.empty? && !block
class_eval(<<-OUT, __FILE__, __LINE__ + 1)
def option_#{optname}(v); v; end # def option_smth(v); v; end
OUT
return
end