1
0
Fork 0
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.  reapplied r24990.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-04-02 05:26:38 +00:00
parent 2df7054c30
commit 104ff6089d
2 changed files with 5 additions and 6 deletions

View file

@ -1,4 +1,7 @@
Fri Apr 2 14:24:27 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
Fri Apr 2 14:26:26 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): don't branch by
RUBY_VERSION. reapplied r24990.
* lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): emacs local variables
are delimited by a semicolon. supported Vim style. reapplied

View file

@ -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"]