Skip to content

Conversation

@themichaelyang
Copy link
Contributor

@themichaelyang themichaelyang commented Dec 20, 2025

Hi! I noticed that the documentation for getresource was missing a number of supported DNS resource types.

I also added a test to check every supported resource type.

Here's the irb snippet I wrote to get the typeclasses missing from the docs:

require "resolv"

documented = <<EOF
    # * Resolv::DNS::Resource::IN::A
    # * Resolv::DNS::Resource::IN::AAAA
    # * Resolv::DNS::Resource::IN::ANY
    # * Resolv::DNS::Resource::IN::CNAME
    # * Resolv::DNS::Resource::IN::HINFO
    # * Resolv::DNS::Resource::IN::MINFO
    # * Resolv::DNS::Resource::IN::MX
    # * Resolv::DNS::Resource::IN::NS
    # * Resolv::DNS::Resource::IN::PTR
    # * Resolv::DNS::Resource::IN::SOA
    # * Resolv::DNS::Resource::IN::TXT
    # * Resolv::DNS::Resource::IN::WKS
EOF
.split("\n").map { _1.split("::").last }

actual = Resolv::DNS::Resource::IN.constants.map(&:to_s)

p documented - actual # => []
p actual - documented # => ["CAA", "SRV", "ClassValue", "ServiceBinding", "LOC", "SVCB", "HTTPS"]

# `ClassValue` and `ServiceBinding` are constants but not valid resource types

@themichaelyang
Copy link
Contributor Author

Hi @st0012, would you be able to review this? I saw you merged the most recent PR.

@themichaelyang
Copy link
Contributor Author

It looks like the test I added was breaking in some Github Actions workflows (it worked fine locally). I removed it for simplicity, as these classes are unlikely to change.

@themichaelyang
Copy link
Contributor Author

themichaelyang commented Jan 27, 2026

Anything I can do to help get this merged @st0012?

@hsbt hsbt merged commit 763992d into ruby:master Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants