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

ruby-changes:3251

From: ko1@a...
Date: 28 Dec 2007 01:29:05 +0900
Subject: [ruby-changes:3251] akr - Ruby:r14744 (trunk): * lib/rdoc/rdoc.rb (parse_files): don't depend on the default external

akr	2007-12-28 01:28:45 +0900 (Fri, 28 Dec 2007)

  New Revision: 14744

  Modified files:
    trunk/ChangeLog
    trunk/lib/rdoc/rdoc.rb

  Log:
    * lib/rdoc/rdoc.rb (parse_files): don't depend on the default external
      encoding.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14744&r2=14743
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/rdoc/rdoc.rb?r1=14744&r2=14743

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14743)
+++ ChangeLog	(revision 14744)
@@ -1,3 +1,8 @@
+Fri Dec 28 01:27:47 2007  Tanaka Akira  <akr@f...>
+
+	* lib/rdoc/rdoc.rb (parse_files): don't depend on the default external
+	  encoding.
+
 Fri Dec 28 00:01:57 2007  NAKAMURA Usaku  <usa@r...>
 
 	* common.mk (golf_prelude.c): use MINIRUBY instead of BASERUBY because
Index: lib/rdoc/rdoc.rb
===================================================================
--- lib/rdoc/rdoc.rb	(revision 14743)
+++ lib/rdoc/rdoc.rb	(revision 14744)
@@ -219,7 +219,7 @@
       file_list.each do |fn|
         $stderr.printf("\n%35s: ", File.basename(fn)) unless options.quiet
         
-        content = File.open(fn, "r") {|f| f.read}
+        content = File.open(fn, "r:ascii-8bit") {|f| f.read}
         if /coding:\s*(\S+)/ =~ content[/\A(?:.*\n){0,2}/]
           if enc = Encoding.find($1)
             content.force_encoding(enc)

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

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