From 415646554c89724b18efa04a3223dc0e5d838376 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 24 Jul 2024 01:08:54 +1200 Subject: [PATCH] Remove legacy code. --- lib/async/dns/resolver.rb | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/async/dns/resolver.rb b/lib/async/dns/resolver.rb index 737aa50..a80cfe7 100644 --- a/lib/async/dns/resolver.rb +++ b/lib/async/dns/resolver.rb @@ -34,24 +34,9 @@ def self.default(**options) # Servers are specified in the same manor as options[:listen], e.g. # [:tcp/:udp, address, port] # In the case of multiple servers, they will be checked in sequence. - def initialize(endpoint, timeout: nil, ndots: 1, search: nil, origin: nil, cache: Cache.new, **options) + def initialize(endpoint, ndots: 1, search: nil, origin: nil, cache: Cache.new, **options) @endpoint = endpoint - # Legacy support for multiple endpoints: - if @endpoint.is_a?(Array) - warn "Using Array specifications for endpoint is deprecated. Please use IO::Endpoint::CompositeEndpoint instead.", uplevel: 1 - - endpoints = @endpoint.map do |specification| - ::IO::Endpoint.public_send(specification[0], *specification[1..-1]) - end - - @endpoint = ::IO::Endpoint.composite(*endpoints) - end - - if timeout - @endpoint = @endpoint.with(timeout: timeout) - end - @ndots = ndots if search @search = search @@ -65,8 +50,6 @@ def initialize(endpoint, timeout: nil, ndots: 1, search: nil, origin: nil, cache @cache = cache @options = options - - @count = 0 end # The search domains, which are used to generate fully qualified names if required.