diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-02 05:26:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-02 05:26:38 +0000 |
commit | 104ff6089d337a33927f6e2cf3b8501e46402d37 (patch) | |
tree | 6bc9725f6ae515b7dc9c1e6089403b02e95a78cd /lib | |
parent | 2df7054c3035b7c75d5a5e029f7928bd39374592 (diff) | |
download | ruby-104ff6089d337a33927f6e2cf3b8501e46402d37.tar.gz |
* lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): don't branch by
RUBY_VERSION. reapplied r24990.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rdoc/rdoc.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 10daefd5b9..b2c7d55b77 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -380,11 +380,7 @@ The internal error was: end def read_file_contents(filename) - content = if RUBY_VERSION >= '1.9' then - File.open(filename, "r:ascii-8bit") { |f| f.read } - else - File.read filename - end + content = File.open(filename, "rb") { |f| f.read } if defined? Encoding then if /coding[=:]\s*([^\s;]+)/i =~ content[%r"\A(?:#!.*\n)?.*\n"] |