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

* lib/resolv.rb (Reolv::DNS#each_address): get A record and then AAAA

record. [ruby-dev:32925]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-01-05 15:53:35 +00:00
parent 7967e3e2f4
commit 2435067f6c
2 changed files with 7 additions and 10 deletions

View file

@ -1,3 +1,8 @@
Sun Jan 6 00:48:12 2008 NARUSE, Yui <naruse@ruby-lang.org>
* lib/resolv.rb (Reolv::DNS#each_address): get A record and then AAAA
record. [ruby-dev:32925]
Sat Jan 5 21:48:03 2008 Tanaka Akira <akr@fsij.org>
* vm_insnhelper.c (vm_callee_setup_arg): it is not inlinable because

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
##