async-dns
async-dns copied to clipboard
README resolver addresses_for example improvements
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.