mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): don't branch by
RUBY_VERSION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0e62186da2
commit
2f2d213f7e
1 changed files with 2 additions and 5 deletions
|
@ -203,11 +203,8 @@ module RDoc
|
|||
file_list.each do |filename|
|
||||
@stats.add_file 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 }
|
||||
content.gsub!(/\r$/, '')
|
||||
|
||||
if defined?(::Encoding) then
|
||||
if /coding[=:]\s*([^\s;]+)/ =~ content[/\A(?:!.*\n)?(.*\n)/, 1]
|
||||
|
|
Loading…
Add table
Reference in a new issue