diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1909,15 +1909,12 @@ rb_enc_cr_str_buf_cat(VALUE str, const char *ptr, long len, int str_encindex = ENCODING_GET(str); int res_encindex; int str_cr, res_cr; - int ptr_a8 = ptr_encindex == 0; str_cr = ENC_CODERANGE(str); if (str_encindex == ptr_encindex) { - if (str_cr == ENC_CODERANGE_UNKNOWN || - (ptr_a8 && str_cr != ENC_CODERANGE_7BIT)) { + if (str_cr == ENC_CODERANGE_UNKNOWN) ptr_cr = ENC_CODERANGE_UNKNOWN; - } else if (ptr_cr == ENC_CODERANGE_UNKNOWN) { ptr_cr = coderange_scan(ptr, len, rb_enc_from_index(ptr_encindex)); } |