resolv
resolv copied to clipboard
Allow setting default Resolv::DNS config in Resolv.new
Instead of just passing the use_ipv6 option, pass all options given. By using a singular hash argument instead of keywords, this avoids the issue when a user does:
Resolv.new([Resolv::DNS.new], use_ipv6: false)
Which would have resulted in the use_ipv6 option being ignored.
This is backwards compatible, because there has not yet been a release with the use_ipv6 keyword supported.
Prompted by https://github.com/ruby/resolv/pull/14#issuecomment-1825944745
My recommendation would be to warn for the :use_ipv6 option in Ruby 3.4, since it was just introduced in Ruby 3.3, and remove it in Ruby 3.5. Would you be OK with that?
sounds good for me
@sorah OK, I made that change.
@sorah Do you think we can merge this so this change makes it into Ruby 3.4?
@sorah @hsbt @mame I'd like this to make Ruby 3.4, since it missed Ruby 3.3. Is it possible for one of you to review and merge?