[前][次][番号順一覧][スレッド一覧]

ruby-changes:3938

From: ko1@a...
Date: Mon, 11 Feb 2008 10:47:48 +0900 (JST)
Subject: [ruby-changes:3938] naruse - Ruby:r15428 (trunk): * ruby.c (load_file): the encoding of DATA follows the source

naruse	2008-02-11 10:47:26 +0900 (Mon, 11 Feb 2008)

  New Revision: 15428

  Modified files:
    trunk/ChangeLog
    trunk/ruby.c

  Log:
    * ruby.c (load_file): the encoding of DATA follows the source
      file encoding. [ruby-dev:33693]

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ruby.c?r1=15428&r2=15427&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15428&r2=15427&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15427)
+++ ChangeLog	(revision 15428)
@@ -1,3 +1,8 @@
+Mon Feb 11 10:43:31 2008  NARUSE, Yui  <naruse@r...>
+
+	* ruby.c (load_file): the encoding of DATA follows the source
+	  file encoding. [ruby-dev:33693]
+
 Mon Feb 11 06:50:42 2008  Yusuke Endoh  <mame@t...>
 
 	* test/ruby/test_pack.rb: fix tests for 64bit CPU.
Index: ruby.c
===================================================================
--- ruby.c	(revision 15427)
+++ ruby.c	(revision 15428)
@@ -1192,8 +1192,8 @@
     else {
 	enc = rb_usascii_encoding();
     }
-    rb_funcall(f, rb_intern("set_encoding"), 1, rb_enc_from_encoding(enc));
     tree = (NODE *)rb_parser_compile_file(parser, fname, f, line_start);
+    rb_funcall(f, rb_intern("set_encoding"), 1, rb_parser_encoding(parser));
     if (script && rb_parser_end_seen_p(parser)) {
 	rb_define_global_const("DATA", f);
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]