1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/resolv.rb (Resolv::DNS#each_address): backport from 1.9 for

CNAME.  [ruby-dev:34200]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-04-10 05:13:15 +00:00
parent da277e53d3
commit 495e46a2b0
2 changed files with 7 additions and 10 deletions

View file

@ -1,3 +1,8 @@
Thu Apr 10 14:00:44 2008 Tanaka Akira <akr@fsij.org>
* lib/resolv.rb (Resolv::DNS#each_address): backport from 1.9 for
CNAME. [ruby-dev:34200]
Thu Apr 10 01:42:25 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* enum.c (iterate_method): add prototype to avoid warning on VC++.

View file

@ -387,16 +387,8 @@ class Resolv
# be a Resolv::IPv4 or Resolv::IPv6
def each_address(name)
buf = []
each_resource(name, Resource::IN::ANY) do |resource|
case resource.address
when Resolv::IPv4
yield resource.address
when Resolv::IPv6
buf << resource.address
end
end
buf.each {|resource| yield resource.address}
each_resource(name, Resource::IN::A) {|resource| yield resource.address}
each_resource(name, Resource::IN::AAAA) {|resource| yield resource.address}
end
##