summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/resolv.rb12
2 files changed, 7 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a3f7e3..94a6ffa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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++.
diff --git a/lib/resolv.rb b/lib/resolv.rb
index d4c2eb4..08f80e0 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -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
##