зеркало из https://github.com/github/ruby.git
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0fe34211f2
Коммит
365c321585
|
@ -1,3 +1,9 @@
|
||||||
|
Sat Nov 5 17:29:06 2016 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Sat Nov 5 17:18:24 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* ext/-test/file/fs.c (get_atime_p): Updating of file access times
|
* ext/-test/file/fs.c (get_atime_p): Updating of file access times
|
||||||
|
|
|
@ -572,13 +572,13 @@ class Resolv
|
||||||
def extract_resources(msg, name, typeclass) # :nodoc:
|
def extract_resources(msg, name, typeclass) # :nodoc:
|
||||||
if typeclass < Resource::ANY
|
if typeclass < Resource::ANY
|
||||||
n0 = Name.create(name)
|
n0 = Name.create(name)
|
||||||
msg.each_answer {|n, ttl, data|
|
msg.each_resource {|n, ttl, data|
|
||||||
yield data if n0 == n
|
yield data if n0 == n
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
yielded = false
|
yielded = false
|
||||||
n0 = Name.create(name)
|
n0 = Name.create(name)
|
||||||
msg.each_answer {|n, ttl, data|
|
msg.each_resource {|n, ttl, data|
|
||||||
if n0 == n
|
if n0 == n
|
||||||
case data
|
case data
|
||||||
when typeclass
|
when typeclass
|
||||||
|
@ -590,7 +590,7 @@ class Resolv
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
return if yielded
|
return if yielded
|
||||||
msg.each_answer {|n, ttl, data|
|
msg.each_resource {|n, ttl, data|
|
||||||
if n0 == n
|
if n0 == n
|
||||||
case data
|
case data
|
||||||
when typeclass
|
when typeclass
|
||||||
|
|
Загрузка…
Ссылка в новой задаче