mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/rdoc.rb (parse_files): don't depend on the default external
encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
07c730fcbc
commit
7ee205d1d1
2 changed files with 6 additions and 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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue