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.
This commit is contained in:
parent
b49053a6be
commit
d78ae78fd7
Notes:
git
2023-03-03 14:32:51 +00:00
1
string.c
1
string.c
@ -2473,6 +2473,7 @@ rb_str_modify_expand(VALUE str, long expand)
|
|||||||
else if (expand > 0) {
|
else if (expand > 0) {
|
||||||
RESIZE_CAPA_TERM(str, len + expand, termlen);
|
RESIZE_CAPA_TERM(str, len + expand, termlen);
|
||||||
}
|
}
|
||||||
|
ENC_CODERANGE_CLEAR(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* As rb_str_modify(), but don't clear coderange */
|
/* As rb_str_modify(), but don't clear coderange */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user