summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2023-03-17 10:56:18 +0900
committerNARUSE, Yui <naruse@airemix.jp>2023-03-17 10:56:18 +0900
commitb309c246ee70926d593d3857e1625202e2d0f67b (patch)
tree69606f61bf37b084da1451013cde4976230b0c7f /string.c
parentb73a07359758a9034996752e981e09ddaffe8d87 (diff)
merge revision(s) d78ae78fd76e556e281a743c75bea4c0bb81ed8c: [Backport #19468]
rb_str_modify_expand: clear the string coderange [Bug #19468] b0b9f7201acab05c2a3ad92c3043a1f01df3e17f errornously stopped clearing the coderange. Since `rb_str_modify` clears it, `rb_str_modify_expand` should too. --- string.c | 1 + 1 file changed, 1 insertion(+)
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 6773ed2d86..95f023232a 100644
--- a/string.c
+++ b/string.c
@@ -2460,6 +2460,7 @@ rb_str_modify_expand(VALUE str, long expand)
else if (expand > 0) {
RESIZE_CAPA_TERM(str, len + expand, termlen);
}
+ ENC_CODERANGE_CLEAR(str);
}
/* As rb_str_modify(), but don't clear coderange */