diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-30 15:44:09 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-30 15:44:09 +0000 |
commit | 71e009ed7230cc1cc81b79cea02362bb1b589266 (patch) | |
tree | 0057353cf02675529ae5e99b017ebbece1dfc9de | |
parent | 63e4f2120ce8b80b5782dbf13a691925aea7f3e2 (diff) |
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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | test/fiddle/test_pointer.rb | 6 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 11 insertions, 4 deletions
@@ -1,3 +1,10 @@ +Sat Oct 1 00:43:11 2016 Naohisa Goto <ngotogenome@gmail.com> + + * 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@gmail.com> * string.c (str_buf_cat): Fix capa size for embed string. diff --git a/test/fiddle/test_pointer.rb b/test/fiddle/test_pointer.rb index 3ea9bc86dd..bd059c51d4 100644 --- a/test/fiddle/test_pointer.rb +++ b/test/fiddle/test_pointer.rb @@ -34,7 +34,7 @@ module Fiddle 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 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 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) @@ -1,6 +1,6 @@ #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 |