ruby-changes:15298
From: nobu <ko1@a...>
Date: Fri, 2 Apr 2010 14:26:58 +0900 (JST)
Subject: [ruby-changes:15298] Ruby:r27184 (trunk): * lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): don't branch by
nobu 2010-04-02 14:26:38 +0900 (Fri, 02 Apr 2010) New Revision: 27184 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27184 Log: * lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): don't branch by RUBY_VERSION. reapplied r24990. Modified files: trunk/ChangeLog trunk/lib/rdoc/rdoc.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 27183) +++ ChangeLog (revision 27184) @@ -1,5 +1,8 @@ -Fri Apr 2 14:24:27 2010 Nobuyoshi Nakada <nobu@r...> +Fri Apr 2 14:26:26 2010 Nobuyoshi Nakada <nobu@r...> + * 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 r24988 with fixing a typo for shebang. Index: lib/rdoc/rdoc.rb =================================================================== --- lib/rdoc/rdoc.rb (revision 27183) +++ lib/rdoc/rdoc.rb (revision 27184) @@ -380,11 +380,7 @@ 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"] -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/