ruby-changes:57299
From: usa <ko1@a...>
Date: Tue, 27 Aug 2019 14:28:46 +0900 (JST)
Subject: [ruby-changes:57299] usa: b67fae3712 (ruby_2_5): Revert a part of r67767
https://git.ruby-lang.org/ruby.git/commit/?id=b67fae3712 From b67fae3712b782c7910a2b85ef7302eda7562c25 Mon Sep 17 00:00:00 2001 From: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Tue, 27 Aug 2019 05:02:29 +0000 Subject: Revert a part of r67767 it was not necessary for ruby_2_5. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e diff --git a/string.c b/string.c index 1f52f26..ed7da23 100644 --- a/string.c +++ b/string.c @@ -1136,13 +1136,6 @@ str_replace_shared_without_enc(VALUE str2, VALUE str) https://github.com/ruby/ruby/blob/trunk/string.c#L1136 root = rb_str_new_frozen(str); RSTRING_GETMEM(root, ptr, len); } - if (!STR_EMBED_P(str2) && !FL_TEST_RAW(str2, STR_SHARED|STR_NOFREE)) { - /* TODO: check if str2 is a shared root */ - char *ptr2 = STR_HEAP_PTR(str2); - if (ptr2 != ptr) { - ruby_sized_xfree(ptr2, STR_HEAP_SIZE(str2)); - } - } FL_SET(str2, STR_NOEMBED); RSTRING(str2)->as.heap.len = len; RSTRING(str2)->as.heap.ptr = ptr; diff --git a/version.h b/version.h index 0abdcb4..c4da852 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L1 #define RUBY_VERSION "2.5.6" #define RUBY_RELEASE_DATE "2019-08-27" -#define RUBY_PATCHLEVEL 194 +#define RUBY_PATCHLEVEL 195 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 8 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/