diff options
author | Jeremy Evans <[email protected]> | 2019-07-25 13:47:08 -0700 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2019-07-30 12:12:59 -0700 |
commit | ebc99e026d0ae770b297a93d1f1c1ceeffd13bfc (patch) | |
tree | 3056613c4ee5ac179256c200a9fcda888d6eaf4a /io.c | |
parent | d8562ab2a40658db0e6a44ce07cfbe616b9b4078 (diff) |
Do not change IO.pipe encodings if encodings explicitly given
This commit makes it so that if the binmode option is given with
any encoding arguments, the reader and writer IO objects are
not set to binary encoding.
Fixes [Bug #12989]
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |