ruby-changes:44510
From: akr <ko1@a...>
Date: Sat, 5 Nov 2016 17:33:06 +0900 (JST)
Subject: [ruby-changes:44510] akr:r56583 (trunk): extract_resources uses each_resource instead of each_answer.
akr 2016-11-05 17:33:03 +0900 (Sat, 05 Nov 2016) New Revision: 56583 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56583 Log: extract_resources uses each_resource instead of each_answer. * lib/resolv.rb (Resolv::DNS#extract_resources): Use each_resource instead of each_answer. [ruby-core:75461] [Bug#12372] reported by Rafael Fernandez Lopez. Modified files: trunk/ChangeLog trunk/lib/resolv.rb Index: lib/resolv.rb =================================================================== --- lib/resolv.rb (revision 56582) +++ lib/resolv.rb (revision 56583) @@ -572,13 +572,13 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/lib/resolv.rb#L572 def extract_resources(msg, name, typeclass) # :nodoc: if typeclass < Resource::ANY n0 = Name.create(name) - msg.each_answer {|n, ttl, data| + msg.each_resource {|n, ttl, data| yield data if n0 == n } end yielded = false n0 = Name.create(name) - msg.each_answer {|n, ttl, data| + msg.each_resource {|n, ttl, data| if n0 == n case data when typeclass @@ -590,7 +590,7 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/lib/resolv.rb#L590 end } return if yielded - msg.each_answer {|n, ttl, data| + msg.each_resource {|n, ttl, data| if n0 == n case data when typeclass Index: ChangeLog =================================================================== --- ChangeLog (revision 56582) +++ ChangeLog (revision 56583) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Nov 5 17:29:06 2016 Tanaka Akira <akr@f...> + + * lib/resolv.rb (Resolv::DNS#extract_resources): Use each_resource + instead of each_answer. + [ruby-core:75461] [Bug#12372] reported by Rafael Fernandez Lopez. + Sat Nov 5 17:18:24 2016 NARUSE, Yui <naruse@r...> * ext/-test/file/fs.c (get_atime_p): Updating of file access times -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/