summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/string.c b/string.c
index cdb919939b..1aae6120aa 100644
--- a/string.c
+++ b/string.c
@@ -2026,6 +2026,8 @@ rb_str_concat(VALUE str1, VALUE str2)
}
rb_str_resize(str1, pos+len);
rb_enc_mbcput(lc, RSTRING_PTR(str1)+pos, enc);
+ if (cr == ENC_CODERANGE_7BIT && lc > 127)
+ cr = ENC_CODERANGE_VALID;
ENC_CODERANGE_SET(str1, cr);
return str1;
}