diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-29 08:15:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-29 08:15:50 +0000 |
commit | f5bb2d991ebe0b16d66d6a97f025f6f63c079ab6 (patch) | |
tree | 2bf7662447faa12cda250ac757fc5ffa5f93822b /string.c | |
parent | 6164e8691a4378bf9cc2c159e4bb01e47f12d3cf (diff) | |
download | ruby-f5bb2d991ebe0b16d66d6a97f025f6f63c079ab6.tar.gz |
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/trunk@60060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6637,7 +6637,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); |