ruby-changes:3502
From: ko1@a...
Date: Sun, 13 Jan 2008 13:51:02 +0900 (JST)
Subject: [ruby-changes:3502] nobu - Ruby:r15021 (trunk): * ruby.c (load_file): script files should not be affected by locale.
nobu 2008-01-13 13:50:48 +0900 (Sun, 13 Jan 2008) New Revision: 15021 Modified files: trunk/ChangeLog trunk/ruby.c Log: * ruby.c (load_file): script files should not be affected by locale. [ruby-dev:33054] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ruby.c?r1=15021&r2=15020&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15021&r2=15020&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 15020) +++ ChangeLog (revision 15021) @@ -1,3 +1,8 @@ +Sun Jan 13 13:50:46 2008 Nobuyoshi Nakada <nobu@r...> + + * ruby.c (load_file): script files should not be affected by locale. + [ruby-dev:33054] + Sun Jan 13 12:01:32 2008 Eric Hodel <drbrain@s...> * lib/rdoc/generators*: Reorganize RDoc generators. Index: ruby.c =================================================================== --- ruby.c (revision 15020) +++ ruby.c (revision 15021) @@ -1151,8 +1151,12 @@ } require_libraries(); /* Why here? unnatural */ } - if (opt->enc_index >= 0) rb_enc_associate_index(f, opt->enc_index); - else rb_enc_associate(f, rb_locale_encoding()); + if (opt->enc_index >= 0) { + rb_enc_associate_index(f, opt->enc_index); + } + else if (f == rb_stdin) { + rb_enc_associate(f, rb_locale_encoding()); + } tree = (NODE *)rb_parser_compile_file(parser, fname, f, line_start); if (script && rb_parser_end_seen_p(parser)) { rb_define_global_const("DATA", f); -- ML: ruby-changes@q... Info: