string.c: don't clear coderange at expanding
* string.c (rb_str_modify_expand): like as str_modify_keep_cr, don't clear coderange unless broken. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0ee6aff847
commit
af2228a08d
5
string.c
5
string.c
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user