summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-27 05:02:29 (GMT)
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-27 05:02:29 (GMT)
commitb67fae3712b782c7910a2b85ef7302eda7562c25 (patch)
tree87ab7425e3394f97e33bbf86c6064019c6c552a4
parent00a7d49b422b5cca81120e370c97c4ce0d864fe8 (diff)
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
-rw-r--r--string.c7
-rw-r--r--version.h2
2 files changed, 1 insertions, 8 deletions
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)
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 @@
#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