async-dns icon indicating copy to clipboard operation
async-dns copied to clipboard

README resolver addresses_for example improvements

Open tadman opened this issue 5 years ago • 0 comments

The example given in the README is missing which require headers are necessary. Based on the errors you get when trying to run it bare the following would make sense:

require 'async'
require 'async/io/endpoint'
require 'async/dns/resolver'

Yet this results in:NoMethodError: undefined method each' for Async::IO::Endpoint:Class`

What's missing is:

require 'async'
require 'async/io'
require 'async/dns/resolver'

Ideally Async::DNS would just load whatever it needs as dependencies, at least if that doesn't cause any trouble. It'd be nice if require 'async/dns' or require 'async/dns/resolver' was sufficient.

tadman avatar Sep 25 '20 06:09 tadman