diff --git a/ChangeLog b/ChangeLog index 24b9bedefd..e9697207e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Apr 2 14:24:27 2010 Nobuyoshi Nakada + + * 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. + Fri Apr 2 14:16:54 2010 Nobuyoshi Nakada * lib/rdoc/parser/ruby.rb (RDoc::Parser::Ruby): parse also rdoc diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 230639fb0c..10daefd5b9 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -387,7 +387,7 @@ The internal error was: end if defined? Encoding then - if /coding:\s*([\w-]+)/i =~ content[/\A(?:.*\n){0,2}/] + if /coding[=:]\s*([^\s;]+)/i =~ content[%r"\A(?:#!.*\n)?.*\n"] if enc = ::Encoding.find($1) content.force_encoding(enc) end