From d78ae78fd76e556e281a743c75bea4c0bb81ed8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Ceccon?= Date: Fri, 3 Mar 2023 14:38:49 +0100 Subject: 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(+) (limited to 'string.c') diff --git a/string.c b/string.c index 6fd5866336..f556cdf180 100644 --- a/string.c +++ b/string.c @@ -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 */ -- cgit v1.2.1