aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/io.c b/io.c
index b16428e829..c6630fcd73 100644
--- a/io.c
+++ b/io.c
@@ -6533,7 +6533,7 @@ argf_next_argv(VALUE argf)
}
ARGF.current_file = prep_io(fr, FMODE_READABLE, rb_cFile, fn);
}
- if (ARGF.binmode) rb_io_binmode(ARGF.current_file);
+ if (ARGF.binmode) rb_io_ascii8bit_binmode(ARGF.current_file);
if (ARGF.encs.enc) {
rb_io_t *fptr;
@@ -8604,7 +8604,8 @@ argf_binmode_m(VALUE argf)
ARGF.binmode = 1;
next_argv();
ARGF_FORWARD(0, 0);
- rb_io_binmode(ARGF.current_file);
+ rb_io_ascii8bit_binmode(ARGF.current_file);
+
return argf;
}