Skip to content

Commit

Permalink
rb_str_modify_expand: clear the string coderange
Browse files Browse the repository at this point in the history
[Bug #19468]

b0b9f72 errornously stopped
clearing the coderange.

Since `rb_str_modify` clears it, `rb_str_modify_expand`
should too.
  • Loading branch information
romuloceccon authored and byroot committed Mar 3, 2023
1 parent b49053a commit d78ae78
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions string.c
Expand Up @@ -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 */
Expand Down

0 comments on commit d78ae78

Please sign in to comment.