aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
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 00d3716839..d0257ff42e 100644
--- a/io.c
+++ b/io.c
@@ -10313,7 +10313,7 @@ rb_io_s_pipe(int argc, VALUE *argv, VALUE klass)
extract_binmode(opt, &fmode);
- if (fmode & FMODE_BINMODE) {
+ if ((fmode & FMODE_BINMODE) && v1 == Qnil) {
rb_io_ascii8bit_binmode(r);
rb_io_ascii8bit_binmode(w);
}