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

ruby-changes:40794

From: nagachika <ko1@a...>
Date: Fri, 4 Dec 2015 02:57:09 +0900 (JST)
Subject: [ruby-changes:40794] nagachika:r52873 (ruby_2_2): merge revision(s) 52868: [Backport #11767]

nagachika	2015-12-04 02:56:53 +0900 (Fri, 04 Dec 2015)

  New Revision: 52873

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

  Log:
    merge revision(s) 52868: [Backport #11767]
    
    * range.c (range_to_s): should be infected by the receiver.
      str2 infects by appending.  [ruby-core:71811] [Bug #11767]

  Modified directories:
    branches/ruby_2_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/range.c
    branches/ruby_2_2/test/ruby/test_range.rb
    branches/ruby_2_2/version.h
Index: ruby_2_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 52872)
+++ ruby_2_2/ChangeLog	(revision 52873)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Fri Dec  4 02:42:37 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* range.c (range_to_s): should be infected by the receiver.
+	  str2 infects by appending.  [ruby-core:71811] [Bug #11767]
+
 Wed Dec  2 03:17:01 2015  NARUSE, Yui  <naruse@r...>
 
 	* ext/readline/extconf.rb: call dir_config("libedit")
Index: ruby_2_2/range.c
===================================================================
--- ruby_2_2/range.c	(revision 52872)
+++ ruby_2_2/range.c	(revision 52873)
@@ -1085,7 +1085,7 @@ range_to_s(VALUE range) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/range.c#L1085
     str = rb_str_dup(str);
     rb_str_cat(str, "...", EXCL(range) ? 3 : 2);
     rb_str_append(str, str2);
-    OBJ_INFECT(str, str2);
+    OBJ_INFECT(str, range);
 
     return str;
 }
@@ -1103,7 +1103,7 @@ inspect_range(VALUE range, VALUE dummy, https://github.com/ruby/ruby/blob/trunk/ruby_2_2/range.c#L1103
     str = rb_str_dup(str);
     rb_str_cat(str, "...", EXCL(range) ? 3 : 2);
     rb_str_append(str, str2);
-    OBJ_INFECT(str, str2);
+    OBJ_INFECT(str, range);
 
     return str;
 }
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 52872)
+++ ruby_2_2/version.h	(revision 52873)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.4"
-#define RUBY_RELEASE_DATE "2015-12-02"
-#define RUBY_PATCHLEVEL 218
+#define RUBY_RELEASE_DATE "2015-12-04"
+#define RUBY_PATCHLEVEL 219
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 2
+#define RUBY_RELEASE_DAY 4
 
 #include "ruby/version.h"
 
Index: ruby_2_2/test/ruby/test_range.rb
===================================================================
--- ruby_2_2/test/ruby/test_range.rb	(revision 52872)
+++ ruby_2_2/test/ruby/test_range.rb	(revision 52873)
@@ -271,11 +271,21 @@ class TestRange < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/ruby/test_range.rb#L271
   def test_to_s
     assert_equal("0..1", (0..1).to_s)
     assert_equal("0...1", (0...1).to_s)
+
+    bug11767 = '[ruby-core:71811] [Bug #11767]'
+    assert_predicate(("0".taint.."1").to_s, :tainted?, bug11767)
+    assert_predicate(("0".."1".taint).to_s, :tainted?, bug11767)
+    assert_predicate(("0".."1").taint.to_s, :tainted?, bug11767)
   end
 
   def test_inspect
     assert_equal("0..1", (0..1).inspect)
     assert_equal("0...1", (0...1).inspect)
+
+    bug11767 = '[ruby-core:71811] [Bug #11767]'
+    assert_predicate(("0".taint.."1").inspect, :tainted?, bug11767)
+    assert_predicate(("0".."1".taint).inspect, :tainted?, bug11767)
+    assert_predicate(("0".."1").taint.inspect, :tainted?, bug11767)
   end
 
   def test_eqq

Property changes on: ruby_2_2
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r52868


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

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