diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-17 02:50:37 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-17 02:50:37 +0000 |
commit | d4f507ab97bb039ca5e7b9fcfc1adddfa5e9efaf (patch) | |
tree | ddac47734f604be140b8d566f47915b7a0eaa344 | |
parent | 4aacaf216c64be1c45983aa992c8f4f9160ba6c7 (diff) |
merge revision(s) 49586: [Backport #10853]
* string.c (str_discard): does not free for STR_NOFREE string.
[Bug #10853][ruby-core:68110]
* bootstraptest/test_string.rb: test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | bootstraptest/test_string.rb | 3 | ||||
-rw-r--r-- | string.c | 2 | ||||
-rw-r--r-- | version.h | 6 |
4 files changed, 14 insertions, 4 deletions
@@ -1,3 +1,10 @@ +Tue Feb 17 11:50:06 2015 Yusuke Endoh <mame@tsg.ne.jp> + + * string.c (str_discard): does not free for STR_NOFREE string. + [Bug #10853][ruby-core:68110] + + * bootstraptest/test_string.rb: test for above. + Sun Feb 15 13:15:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/socket/getaddrinfo.c (get_addr): reject too long hostname to diff --git a/bootstraptest/test_string.rb b/bootstraptest/test_string.rb new file mode 100644 index 0000000000..849dcd45b0 --- /dev/null +++ b/bootstraptest/test_string.rb @@ -0,0 +1,3 @@ +assert_normal_exit %q{ + inspect.clear +}, '[ruby-core:68110]' @@ -1658,7 +1658,7 @@ static inline void str_discard(VALUE str) { str_modifiable(str); - if (!STR_SHARED_P(str) && !STR_EMBED_P(str)) { + if (!STR_EMBED_P(str) && !FL_TEST(str, STR_SHARED|STR_NOFREE)) { ruby_sized_xfree(STR_HEAP_PTR(str), STR_HEAP_SIZE(str)); RSTRING(str)->as.heap.ptr = 0; RSTRING(str)->as.heap.len = 0; @@ -1,10 +1,10 @@ #define RUBY_VERSION "2.2.0" -#define RUBY_RELEASE_DATE "2015-02-15" -#define RUBY_PATCHLEVEL 49 +#define RUBY_RELEASE_DATE "2015-02-17" +#define RUBY_PATCHLEVEL 50 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 15 +#define RUBY_RELEASE_DAY 17 #include "ruby/version.h" |