ruby-changes:13230
From: nobu <ko1@a...>
Date: Fri, 18 Sep 2009 09:05:45 +0900 (JST)
Subject: [ruby-changes:13230] Ruby:r24988 (trunk): * lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): emacs local variables
nobu 2009-09-18 09:02:35 +0900 (Fri, 18 Sep 2009) New Revision: 24988 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24988 Log: * lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): emacs local variables are delimited by a semicolon. supported Vim style. Modified files: trunk/ChangeLog trunk/lib/rdoc/rdoc.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 24987) +++ ChangeLog (revision 24988) @@ -1,3 +1,8 @@ +Fri Sep 18 09:02:33 2009 Nobuyoshi Nakada <nobu@r...> + + * lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): emacs local variables + are delimited by a semicolon. supported Vim style. + Fri Sep 18 07:06:41 2009 Kazuhiro NISHIYAMA <zn@m...> * test/fileutils/test_fileutils.rb: add a test for [ruby-dev:39345] Index: lib/rdoc/rdoc.rb =================================================================== --- lib/rdoc/rdoc.rb (revision 24987) +++ lib/rdoc/rdoc.rb (revision 24988) @@ -209,8 +209,8 @@ File.read filename end - if defined? Encoding then - if /coding:\s*(\S+)/ =~ content[/\A(?:.*\n){0,2}/] + if defined?(::Encoding) then + if /coding[=:]\s*([^\s;]+)/ =~ content[/\A(?:!.*\n)?(.*\n)/, 1] if enc = ::Encoding.find($1) content.force_encoding(enc) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/