summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index 4db538b12..774f3e7e1 100644
--- a/io.c
+++ b/io.c
@@ -834,7 +834,7 @@ do_writeconv(VALUE str, rb_io_t *fptr)
}
if (!NIL_P(common_encoding)) {
- str = rb_str_transcode(str, common_encoding,
+ str = rb_str_encode(str, common_encoding,
fptr->writeconv_pre_ecflags, fptr->writeconv_pre_ecopts);
}
@@ -4683,7 +4683,7 @@ rb_scan_open_args(int argc, VALUE *argv,
static VALUE fs_enc;
if (!fs_enc)
fs_enc = rb_enc_from_encoding(fs_encoding);
- fname = rb_str_transcode(fname, fs_enc, 0, Qnil);
+ fname = rb_str_encode(fname, fs_enc, 0, Qnil);
}
}
#endif