summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/io.c b/io.c
index fd0552b237e..3153ff7c23e 100644
--- a/io.c
+++ b/io.c
@@ -8407,6 +8407,17 @@ rb_io_set_encoding(int argc, VALUE *argv, VALUE io)
return io;
}
+void
+rb_stdio_set_default_encoding()
+{
+ extern VALUE rb_stdin, rb_stdout, rb_stderr;
+ VALUE val = Qnil;
+
+ rb_io_set_encoding(1, &val, rb_stdin);
+ rb_io_set_encoding(1, &val, rb_stdout);
+ rb_io_set_encoding(1, &val, rb_stderr);
+}
+
static VALUE
argf_external_encoding(VALUE argf)
{