summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index d67d57dd64..fc6fe5942f 100644
--- a/string.c
+++ b/string.c
@@ -1577,7 +1577,7 @@ str_make_independent_expand(VALUE str, long expand)
memcpy(ptr, RSTRING_PTR(str), len);
}
STR_SET_NOEMBED(str);
- FL_UNSET(str, STR_SHARED);
+ FL_UNSET(str, STR_SHARED|STR_NOFREE);
TERM_FILL(ptr + len, termlen);
RSTRING(str)->as.heap.ptr = ptr;
RSTRING(str)->as.heap.len = len;