aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-06-27 10:11:29 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-06-27 16:32:15 +0900
commita4d6d4c83b34f3967cffc6d25313f9d3156aa7b7 (patch)
treec97e188872462de2a36a7029462c53292ea85966 /string.c
parent4376437c378e6a9f8a64cfa095dcedae1542cb4b (diff)
downloadruby-topic/string-expand-improvements.tar.gz
string.c: unset STR_SHARED and STR_NOFREE flags in #initializetopic/string-expand-improvements
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index c5ef67a6c6..994e52d2ed 100644
--- a/string.c
+++ b/string.c
@@ -1551,6 +1551,7 @@ rb_str_init(int argc, VALUE *argv, VALUE str)
if (n == 1) {
memcpy(RSTRING(str)->as.heap.ptr, RSTRING_PTR(orig), len);
rb_enc_cr_str_exact_copy(str, orig);
+ FL_UNSET(str, STR_SHARED|STR_NOFREE);
}
FL_SET(str, STR_NOEMBED);
RSTRING(str)->as.heap.aux.capa = capa;