diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1500,7 +1500,10 @@ rb_str_modify_expand(VALUE str, long expand) str_make_independent_expand(str, expand); } } - ENC_CODERANGE_CLEAR(str); + if (ENC_CODERANGE(str) == ENC_CODERANGE_BROKEN) { + /* Force re-scan later */ + ENC_CODERANGE_CLEAR(str); + } } /* As rb_str_modify(), but don't clear coderange */ |