diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-27 16:28:45 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-27 16:28:45 +0000 |
| commit | f7dd0c6d6e2270017901cc6d83eff5960884f342 (patch) | |
| tree | 552062c243d812225137a3e3d6cd2a78393b958c /lib | |
| parent | ba913d1c4dc3df4b96c2079a55bbca4be7e0f10b (diff) | |
| download | ruby-f7dd0c6d6e2270017901cc6d83eff5960884f342.tar.gz ruby-f7dd0c6d6e2270017901cc6d83eff5960884f342.tar.xz ruby-f7dd0c6d6e2270017901cc6d83eff5960884f342.zip | |
* lib/rdoc/rdoc.rb (parse_files): don't depend on the default external
encoding.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/rdoc/rdoc.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 51038a165..f93d9c960 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) |
