summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-31 04:45:05 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-31 04:45:05 +0000
commite36d40f9231d272b5ca9b33d36c85edf647ac934 (patch)
treeb3386ba8de0ab957ce61bb5b6e7b8cf8c1fe64e0
parent69a7bb31f917bd68d78460216aa2ef274428790e (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--lib/resolv.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f02c60..7641600 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the
diff --git a/lib/resolv.rb b/lib/resolv.rb
index 5a4c0eb..3f3ed41 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -1237,7 +1237,7 @@ class Resolv
def ==(other) # :nodoc:
return false unless Name === other
return false unless @absolute == other.absolute?
- return @labels.join('.').casecmp(other.to_a.join('.')).zero?
+ return @labels == other.to_a
end
alias eql? == # :nodoc: