[前][次][番号順一覧][スレッド一覧]

ruby-changes:37694

From: nagachika <ko1@a...>
Date: Sat, 28 Feb 2015 02:21:57 +0900 (JST)
Subject: [ruby-changes:37694] nagachika:r49775 (ruby_2_1): merge revision(s) r49071, r49072, r49073, r49078: [Backport #10550]

nagachika	2015-02-28 02:21:43 +0900 (Sat, 28 Feb 2015)

  New Revision: 49775

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49775

  Log:
    merge revision(s) r49071,r49072,r49073,r49078: [Backport #10550]
    
    * lib/resolv.rb (Resolv::DNS::Name): names with different dots
      should be different.
    
    * lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the
      comparison should be case-insensitive as well.
      [ruby-core:66498] [Bug #10550]
    
    * lib/resolv.rb (Resolv::DNS::Name#==): Compare an array of Label:Str
      objects.  Label#Str#== is case-insensitive.

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/lib/resolv.rb
    branches/ruby_2_1/test/resolv/test_dns.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 49774)
+++ ruby_2_1/ChangeLog	(revision 49775)
@@ -1,3 +1,19 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Sat Feb 28 02:13:17 2015  Tanaka Akira  <akr@f...>
+
+	* lib/resolv.rb (Resolv::DNS::Name#==): Compare an array of Label:Str
+	  objects.  Label#Str#== is case-insensitive.
+
+Sat Feb 28 02:13:17 2015  Ben Miller  <bmiller@r...>
+
+	* lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the
+	  comparison should be case-insensitive as well.
+	  [ruby-core:66498] [Bug #10550]
+
+Sat Feb 28 02:13:17 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/resolv.rb (Resolv::DNS::Name): names with different dots
+	  should be different.
+
 Thu Feb 19 19:14:34 2015  NARUSE, Yui  <naruse@r...>
 
 	* lib/net/http/response.rb (Net::HTTPResponse): require one or more
Index: ruby_2_1/lib/resolv.rb
===================================================================
--- ruby_2_1/lib/resolv.rb	(revision 49774)
+++ ruby_2_1/lib/resolv.rb	(revision 49775)
@@ -1240,7 +1240,8 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/ruby_2_1/lib/resolv.rb#L1240
 
       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 == other.to_a
       end
 
       alias eql? == # :nodoc:
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 49774)
+++ ruby_2_1/version.h	(revision 49775)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.5"
-#define RUBY_RELEASE_DATE "2015-02-19"
-#define RUBY_PATCHLEVEL 299
+#define RUBY_RELEASE_DATE "2015-02-28"
+#define RUBY_PATCHLEVEL 300
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 19
+#define RUBY_RELEASE_DAY 28
 
 #include "ruby/version.h"
 
Index: ruby_2_1/test/resolv/test_dns.rb
===================================================================
--- ruby_2_1/test/resolv/test_dns.rb	(revision 49774)
+++ ruby_2_1/test/resolv/test_dns.rb	(revision 49775)
@@ -175,4 +175,17 @@ class TestResolvDNS < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/resolv/test_dns.rb#L175
       end
     end
   end
+
+  def test_dots_diffences
+    name1 = Resolv::DNS::Name.create("example.org")
+    name2 = Resolv::DNS::Name.create("ex.ampl.eo.rg")
+    assert_not_equal(name1, name2, "different dots")
+  end
+
+  def test_case_insensitive_name
+    bug10550 = '[ruby-core:66498] [Bug #10550]'
+    lower = Resolv::DNS::Name.create("ruby-lang.org")
+    upper = Resolv::DNS::Name.create("Ruby-Lang.org")
+    assert_equal(lower, upper, bug10550)
+  end
 end

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r49071-49073,49078


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]