mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* 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
This commit is contained in:
parent
6f58118e4c
commit
34b19050b3
3 changed files with 14 additions and 1 deletions
2
io.c
2
io.c
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue