8000 Remove legacy code. · socketry/async-dns@4156465 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4156465

Browse files
committed
Remove legacy code.
1 parent 5e923c3 commit 4156465

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

lib/async/dns/resolver.rb

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,9 @@ def self.default(**options)
3434
# Servers are specified in the same manor as options[:listen], e.g.
3535
# [:tcp/:udp, address, port]
3636
# In the case of multiple servers, they will be checked in sequence.
37-
def initialize(endpoint, timeout: nil, ndots: 1, search: nil, origin: nil, cache: Cache.new, **options)
37+
def initialize(endpoint, ndots: 1, search: nil, origin: nil, cache: Cache.new, **options)
3838
@endpoint = endpoint
3939

40-
# Legacy support for multiple endpoints:
41-
if @endpoint.is_a?(Array)
42-
warn "Using Array specifications for endpoint is deprecated. Please use IO::Endpoint::CompositeEndpoint instead.", uplevel: 1
43-
44-
endpoints = @endpoint.map do |specification|
45-
::IO::Endpoint.public_send(specification[0], *specification[1..-1])
46-
end
47-
48-
@endpoint = ::IO::Endpoint.composite(*endpoints)
49-
end
50-
51-
if timeout
52-
@endpoint = @endpoint.with(timeout: timeout)
53-
end
54-
5540
@ndots = ndots
5641
if search
5742
@search = search
@@ -65,8 +50,6 @@ def initialize(endpoint, timeout: nil, ndots: 1, search: nil, origin: nil, cache
6550

6651
@cache = cache
6752
@options = options
68-
69-
@count = 0
7053
end
7154

7255
# The search domains, which are used to generate fully qualified names if required.

0 commit comments

Comments
 (0)
0