mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "Set encoding before concatenating to string"
This reverts commit 44368b5f8b
.
This commit is contained in:
parent
aeb344e65c
commit
ae0d67d762
Notes:
git
2022-01-07 07:23:27 +09:00
1 changed files with 1 additions and 1 deletions
2
string.c
2
string.c
|
@ -3187,8 +3187,8 @@ rb_enc_cr_str_buf_cat(VALUE str, const char *ptr, long len,
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return str;
|
return str;
|
||||||
if (RSTRING_LEN(str) == 0) {
|
if (RSTRING_LEN(str) == 0) {
|
||||||
ENCODING_CODERANGE_SET(str, ptr_encindex, ptr_cr);
|
|
||||||
rb_str_buf_cat(str, ptr, len);
|
rb_str_buf_cat(str, ptr, len);
|
||||||
|
ENCODING_CODERANGE_SET(str, ptr_encindex, ptr_cr);
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
goto incompatible;
|
goto incompatible;
|
||||||
|
|
Loading…
Add table
Reference in a new issue