summaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-31 07:37:02 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-31 07:37:02 +0000
commitc8d91dd7a88e4a32247c503340909e3bfe2d3733 (patch)
tree596ab8dc5d853ae3bb204b8ac539e247d337d574 /ruby.c
parentbff387bcb407dbd98465b3e24678c667e3553de4 (diff)
downloadruby-c8d91dd7a88e4a32247c503340909e3bfe2d3733.tar.gz
ruby-c8d91dd7a88e4a32247c503340909e3bfe2d3733.tar.xz
ruby-c8d91dd7a88e4a32247c503340909e3bfe2d3733.zip
Set encodings of stdio after setting default internal and external.
* io.c (rb_stdio_set_default_encoding): added. * ruby.c (process_options): call rb_stdio_set_default_encoding after setting defualt internal and external. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 180455e92..6839bfe32 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1399,6 +1399,7 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
else if (!rb_default_internal_encoding())
/* Freeze default_internal */
rb_enc_set_default_internal(Qnil);
+ rb_stdio_set_default_encoding();
if (!tree) return Qfalse;