1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rdoc: Import RDoc 2.5.2

* lib/rdoc/parser/ruby.rb (RDoc::Parser::Ruby): Don't parse rdoc
  files, reverts r24976 in favor of include directive support in C
  parser.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2010-04-10 06:36:13 +00:00
parent ce2b574017
commit 1325437297
33 changed files with 395 additions and 162 deletions

View file

@ -24,7 +24,10 @@ class RDoc::Parser::Simple < RDoc::Parser
# Extract the file contents and attach them to the TopLevel as a comment
def scan
@top_level.comment = remove_private_comments(@content)
comment = remove_coding_comment @content
comment = remove_private_comments comment
@top_level.comment = comment
@top_level.parser = self.class
@top_level
end
@ -33,5 +36,9 @@ class RDoc::Parser::Simple < RDoc::Parser
comment.gsub(/^--\n.*?^\+\+/m, '').sub(/^--\n.*/m, '')
end
def remove_coding_comment text
text.sub(/\A# .*coding[=:].*$/, '')
end
end