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

ruby-changes:44229

From: usa <ko1@a...>
Date: Sat, 1 Oct 2016 00:44:20 +0900 (JST)
Subject: [ruby-changes:44229] usa:r56302 (ruby_2_2): merge revision(s) 55554: [Backport #12537]

usa	2016-10-01 00:44:09 +0900 (Sat, 01 Oct 2016)

  New Revision: 56302

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

  Log:
    merge revision(s) 55554: [Backport #12537]
    
    * test/fiddle/test_pointer.rb (test_to_str, test_to_s, test_aref_aset):
      Attempt to use independent strings for destructive tests that
      directly modify values on memory by using Fiddle::Pointer.
      [Bug #12537] [ruby-dev:49700]

  Modified directories:
    branches/ruby_2_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/test/fiddle/test_pointer.rb
    branches/ruby_2_2/version.h
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 56301)
+++ ruby_2_2/version.h	(revision 56302)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.6"
 #define RUBY_RELEASE_DATE "2016-10-01"
-#define RUBY_PATCHLEVEL 371
+#define RUBY_PATCHLEVEL 372
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 10
Index: ruby_2_2/test/fiddle/test_pointer.rb
===================================================================
--- ruby_2_2/test/fiddle/test_pointer.rb	(revision 56301)
+++ ruby_2_2/test/fiddle/test_pointer.rb	(revision 56302)
@@ -34,7 +34,7 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/fiddle/test_pointer.rb#L34
     end
 
     def test_to_str
-      str = "hello world"
+      str = Marshal.load(Marshal.dump("hello world"))
       ptr = Pointer[str]
 
       assert_equal 3, ptr.to_str(3).length
@@ -45,7 +45,7 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/fiddle/test_pointer.rb#L45
     end
 
     def test_to_s
-      str = "hello world"
+      str = Marshal.load(Marshal.dump("hello world"))
       ptr = Pointer[str]
 
       assert_equal 3, ptr.to_s(3).length
@@ -201,7 +201,7 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/fiddle/test_pointer.rb#L201
         assert_equal(str[0].ord, ptr[0])
         assert_equal(str[1].ord, ptr[1])
       }
-      str = 'abc'
+      str = Marshal.load(Marshal.dump('abc'))
       ptr = Pointer[str]
       check.call(str, ptr)
 
Index: ruby_2_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 56301)
+++ ruby_2_2/ChangeLog	(revision 56302)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Sat Oct  1 00:43:11 2016  Naohisa Goto  <ngotogenome@g...>
+
+	* test/fiddle/test_pointer.rb (test_to_str, test_to_s, test_aref_aset):
+	  Attempt to use independent strings for destructive tests that
+	  directly modify values on memory by using Fiddle::Pointer.
+	  [Bug #12537] [ruby-dev:49700]
+
 Sat Oct  1 00:06:03 2016  Naohisa Goto  <ngotogenome@g...>
 
 	* string.c (str_buf_cat): Fix capa size for embed string.

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


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

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