diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-31 13:26:35 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-31 13:26:35 +0000 |
commit | a852edd817da6d66b9e034e18f68b5b75566a9b2 (patch) | |
tree | 060d4a241cb7bce514eb99935a9168b3c6c3467d /string.c | |
parent | 91e4978bb0f1fac38226733324828599e7359484 (diff) |
merge revision(s) 60060: [Backport #13950]
string.c: ASCII-incompatible is not ASCII only
* string.c (tr_trans): ASCII-incompatible encoding strings cannot
be ASCII-only even if valid. [ruby-core:83056] [Bug #13950]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6109,7 +6109,7 @@ tr_trans(VALUE str, VALUE src, VALUE repl, int sflag) } } - if (cr == ENC_CODERANGE_VALID) + if (cr == ENC_CODERANGE_VALID && rb_enc_asciicompat(e1)) cr = ENC_CODERANGE_7BIT; str_modify_keep_cr(str); s = RSTRING_PTR(str); send = RSTRING_END(str); |