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::Name#==): Compare an array of Label:Str

objects.  Label#Str#== is case-insensitive.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-12-31 04:45:05 +00:00
parent 69a7bb31f9
commit e36d40f923
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed Dec 31 13:43:48 2014 Tanaka Akira <akr@fsij.org>
* lib/resolv.rb (Resolv::DNS::Name#==): Compare an array of Label:Str
objects. Label#Str#== is case-insensitive.
Tue Dec 30 16:16:12 2014 Ben Miller <bmiller@rackspace.com> Tue Dec 30 16:16:12 2014 Ben Miller <bmiller@rackspace.com>
* lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the * lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the

View file

@ -1237,7 +1237,7 @@ class Resolv
def ==(other) # :nodoc: def ==(other) # :nodoc:
return false unless Name === other return false unless Name === other
return false unless @absolute == other.absolute? return false unless @absolute == other.absolute?
return @labels.join('.').casecmp(other.to_a.join('.')).zero? return @labels == other.to_a
end end
alias eql? == # :nodoc: alias eql? == # :nodoc: