diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-11 09:02:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-11 09:02:11 +0000 |
commit | 34b19050b3894d3e6e072f68c112711696dc1c41 (patch) | |
tree | adcb58cdd3da4276818e43c5ba316855e2ebc46f /io.c | |
parent | 6f58118e4c6b688aa8c78b5310c4e2c12c444537 (diff) |
* io.c (io_getc): should be 7bit if ascii. fixes #4557
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2887,7 +2887,7 @@ io_getc(rb_io_t *fptr, rb_encoding *enc) } else { io_shift_cbuf(fptr, MBCLEN_CHARFOUND_LEN(r), &str); - cr = ENC_CODERANGE_VALID; + cr = ISASCII(r) ? ENC_CODERANGE_7BIT : ENC_CODERANGE_VALID; } str = io_enc_str(str, fptr); ENC_CODERANGE_SET(str, cr); |