summaryrefslogtreecommitdiff
path: root/lib/rdoc/rdoc.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-18 00:02:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-18 00:02:35 +0000
commit70f03998c098c430f489b71b8bd59f5ebc0974f8 (patch)
treeca98e5f2a342f2618266a47f0ae9bde73b7f343b /lib/rdoc/rdoc.rb
parent263abf2963fe089db9a7870be72f30edec13448e (diff)
downloadruby-70f03998c098c430f489b71b8bd59f5ebc0974f8.tar.gz
* lib/rdoc/rdoc.rb (RDoc::RDoc#parse_files): emacs local variables
are delimited by a semicolon. supported Vim style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/rdoc.rb')
-rw-r--r--lib/rdoc/rdoc.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
index ce1cb1a93f..9ddece89e0 100644
--- a/lib/rdoc/rdoc.rb
+++ b/lib/rdoc/rdoc.rb
@@ -209,8 +209,8 @@ module RDoc
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