diff --git a/ChangeLog b/ChangeLog index 5620c4ba43..8ffe86b769 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Aug 23 03:22:34 2016 Naohisa Goto + + * 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] + Tue Aug 23 03:14:22 2016 Naohisa Goto * 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 ec677324eb..aa77c619ef 100644 --- a/test/fiddle/test_pointer.rb +++ b/test/fiddle/test_pointer.rb @@ -35,7 +35,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 @@ -46,7 +46,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 @@ -202,7 +202,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) diff --git a/version.h b/version.h index 6941dd3adc..bf1ff89ab9 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.3.2" #define RUBY_RELEASE_DATE "2016-08-23" -#define RUBY_PATCHLEVEL 175 +#define RUBY_PATCHLEVEL 176 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 8