summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/string.c b/string.c
index 134d65b822..fd240bc07a 100644
--- a/string.c
+++ b/string.c
@@ -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));
}