aboutsummaryrefslogtreecommitdiffstats
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 c6abc43b10..9e919c0759 100644
--- a/io.c
+++ b/io.c
@@ -5075,6 +5075,7 @@ rb_io_init_copy(VALUE dest, VALUE io)
/* copy rb_io_t structure */
fptr->mode = orig->mode & ~FMODE_PREP;
+ fptr->encs = orig->encs;
fptr->pid = orig->pid;
fptr->lineno = orig->lineno;
if (!NIL_P(orig->pathv)) fptr->pathv = orig->pathv;