diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/rdoc/rdoc.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Dec 28 01:27:47 2007 Tanaka Akira <akr@fsij.org> + + * lib/rdoc/rdoc.rb (parse_files): don't depend on the default external + encoding. + Fri Dec 28 00:01:57 2007 NAKAMURA Usaku <usa@ruby-lang.org> * common.mk (golf_prelude.c): use MINIRUBY instead of BASERUBY because diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 51038a1652..f93d9c9606 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -219,7 +219,7 @@ module RDoc 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) |