From 69a7bb31f917bd68d78460216aa2ef274428790e Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 30 Dec 2014 07:16:14 +0000 Subject: resolv.rb: case-insensitive comparison * lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the comparison should be case-insensitive as well. [ruby-core:66498] [Bug #10550] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/resolv.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/resolv.rb') diff --git a/lib/resolv.rb b/lib/resolv.rb index f6971bf500..5a4c0ebdc8 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -1236,8 +1236,8 @@ class Resolv def ==(other) # :nodoc: return false unless Name === other - return @labels.join('.') == other.to_a.join('.') && - @absolute == other.absolute? + return false unless @absolute == other.absolute? + return @labels.join('.').casecmp(other.to_a.join('.')).zero? end alias eql? == # :nodoc: -- cgit v1.2.3