summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 88217efe0..ac7c1f16b 100644
--- a/io.c
+++ b/io.c
@@ -716,6 +716,7 @@ make_writeconv(rb_io_t *fptr)
if (NEED_NEWLINE_ENCODER(fptr))
fptr->writeconv_pre_ecflags |= TEXTMODE_NEWLINE_ENCODER;
#endif
+ ecflags &= ECONV_ERROR_HANDLER_MASK;
enc = fptr->encs.enc2 ? fptr->encs.enc2 : fptr->encs.enc;
senc = rb_econv_stateless_encoding(enc->name);