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

ruby-changes:3744

From: ko1@a...
Date: Fri, 25 Jan 2008 17:12:33 +0900 (JST)
Subject: [ruby-changes:3744] nobu - Ruby:r15233 (trunk): * ruby.c (load_file): set default to ASCII-8BIT explicitly if -K

nobu	2008-01-25 17:12:15 +0900 (Fri, 25 Jan 2008)

  New Revision: 15233

  Modified files:
    trunk/ChangeLog
    trunk/ruby.c

  Log:
    * ruby.c (load_file): set default to ASCII-8BIT explicitly if -K
      option is not given.


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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15232)
+++ ChangeLog	(revision 15233)
@@ -1,3 +1,8 @@
+Fri Jan 25 17:12:13 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* ruby.c (load_file): set default to ASCII-8BIT explicitly if -K
+	  option is not given.
+
 Fri Jan 25 16:31:47 2008  Tanaka Akira  <akr@f...>
 
 	* include/ruby/intern.h (rb_str_buf_cat_ascii): declared.
Index: ruby.c
===================================================================
--- ruby.c	(revision 15232)
+++ ruby.c	(revision 15233)
@@ -1207,11 +1207,9 @@
 	}
     }
     else {
-	enc = 0;
+	enc = rb_ascii8bit_encoding();
     }
-    if (enc) {
-	rb_funcall(f, rb_intern("set_encoding"), 1, rb_enc_from_encoding(enc));
-    }
+    rb_funcall(f, rb_intern("set_encoding"), 1, rb_enc_from_encoding(enc));
     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: http://www.atdot.net/~ko1/quickml/

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