Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolv::MDNS#each_address not work #1484

Closed
wants to merge 2 commits into from

Conversation

elct9620
Copy link

irb(main):001:0> name = Resolv::DNS::Name.create('example.local')
=> #<Resolv::DNS::Name: example.local>
irb(main):002:0> name.to_a.last == 'local'
=> false
irb(main):003:0> name.to_a.last.to_s == 'local'
=> true

Resolv::DNS::Label::Str cannot direct compare with string.
I add to_s and let it work.

@tenderlove
Copy link
Member

Can you add a test?

@elct9620
Copy link
Author

@tenderlove I am not sure this test is ok to others. The each_address will ask DNS server to resolve address, but I didn't found any way to mock it or choose a MDNS services for each os default builtin with it.

@matzbot matzbot closed this in db590b5 Oct 21, 2017
mrkn pushed a commit to mrkn/ruby that referenced this pull request Dec 1, 2017
….local" address.

  ruby#1425

  Patch by @elct9620 [fix rubyGH-1484]

git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/trunk@60275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants