summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 09:02:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 09:02:11 +0000
commit34b19050b3894d3e6e072f68c112711696dc1c41 (patch)
treeadcb58cdd3da4276818e43c5ba316855e2ebc46f /io.c
parent6f58118e4c6b688aa8c78b5310c4e2c12c444537 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 50892e83e6..3618ac2321 100644
--- a/io.c
+++ b/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);