diff --git a/ChangeLog b/ChangeLog index e9697207e0..11e2e63ea1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Fri Apr 2 14:24:27 2010 Nobuyoshi Nakada +Fri Apr 2 14:26:26 2010 Nobuyoshi Nakada + + * 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 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"]