diff options
author | RĂ´mulo Ceccon <romuloceccon@gmail.com> | 2023-03-03 14:38:49 +0100 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2023-03-03 15:32:25 +0100 |
commit | d78ae78fd76e556e281a743c75bea4c0bb81ed8c (patch) | |
tree | a8d223114e7f718df7d037a3d59a6a7b0f9a2061 /string.c | |
parent | b49053a6be3cc449678609f62048b7aed3a1f839 (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7437
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2473,6 +2473,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 */ |