ruby-changes:8530
From: yugui <ko1@a...>
Date: Thu, 30 Oct 2008 23:36:27 +0900 (JST)
Subject: [ruby-changes:8530] Ruby:r20064 (ruby_1_9_1): merges r20056 from trunk into ruby_1_9_1.
yugui 2008-10-30 23:36:09 +0900 (Thu, 30 Oct 2008) New Revision: 20064 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20064 Log: merges r20056 from trunk into ruby_1_9_1. * ruby.c (load_file_internal): should not set script encoding to ASCII-8BIT. * ruby.c (load_file_internal): do not auto convert scripts even when default_internal is set. [ruby-core:19579] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/ruby.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20063) +++ ruby_1_9_1/ChangeLog (revision 20064) @@ -19,6 +19,14 @@ * encoding.c (rb_enc_set_default_internal): ditto for internal. +Thu Oct 30 03:30:25 2008 Yukihiro Matsumoto <matz@r...> + + * ruby.c (load_file_internal): should not set script encoding to + ASCII-8BIT. + + * ruby.c (load_file_internal): do not auto convert scripts even + when default_internal is set. [ruby-core:19579] + Thu Oct 30 02:20:33 2008 Yusuke Endoh <mame@t...> * array.c (rb_ary_sort_bang): remove SEGV when replacing array with @@ -117,9 +125,6 @@ Wed Oct 29 09:30:04 2008 Nobuyoshi Nakada <nobu@r...> - * ruby.c (load_file_internal): use ASCII-8BIT to prevent conversion. - [ruby-core:19579] - * ruby.c (load_file_internal): cache common interned IDs. Wed Oct 29 00:43:39 2008 Tadayoshi Funaba <tadf@d...> Index: ruby_1_9_1/ruby.c =================================================================== --- ruby_1_9_1/ruby.c (revision 20063) +++ ruby_1_9_1/ruby.c (revision 20064) @@ -1356,9 +1356,9 @@ enc = rb_locale_encoding(); } else { - enc = rb_ascii8bit_encoding(); + enc = rb_usascii_encoding(); } - rb_funcall(f, set_encoding, 1, rb_enc_from_encoding(enc)); + rb_funcall(f, set_encoding, 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-")); tree = (NODE *)rb_parser_compile_file(parser, fname, f, line_start); rb_funcall(f, set_encoding, 1, rb_parser_encoding(parser)); if (script && rb_parser_end_seen_p(parser)) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/