ruby-changes:8522
From: matz <ko1@a...>
Date: Thu, 30 Oct 2008 18:18:03 +0900 (JST)
Subject: [ruby-changes:8522] Ruby:r20056 (trunk): * ruby.c (load_file_internal): should not set script encoding to
matz 2008-10-30 18:17:49 +0900 (Thu, 30 Oct 2008) New Revision: 20056 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20056 Log: * 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: trunk/ChangeLog trunk/ruby.c Index: ChangeLog =================================================================== --- ChangeLog (revision 20055) +++ ChangeLog (revision 20056) @@ -25,6 +25,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 @@ -123,9 +131,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.c =================================================================== --- ruby.c (revision 20055) +++ ruby.c (revision 20056) @@ -1381,9 +1381,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/