aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index b1521a1e17..18faa42826 100644
--- a/io.c
+++ b/io.c
@@ -350,7 +350,7 @@ rb_io_check_readable(rb_io_t *fptr)
if (!fptr->enc) {
fptr->enc = (fptr->fd == 0)
? rb_default_external_encoding()
- : rb_ascii_encoding();
+ : rb_ascii8bit_encoding();
}
}
@@ -2892,7 +2892,7 @@ rb_io_binmode(VALUE io)
#endif
fptr->mode |= FMODE_BINMODE;
- fptr->enc = rb_ascii_encoding();
+ fptr->enc = rb_ascii8bit_encoding();
return io;
}