summaryrefslogtreecommitdiff
path: root/lib/rdoc/parsers/parse_c.rb
diff options
context:
space:
mode:
authorryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-10 01:57:22 +0000
committerryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-10 01:57:22 +0000
commit09ac765b2f9e915ab5dead8c3b21aa5eb8748f62 (patch)
treef4926c381878079aca54585a0a8051ee4a305b42 /lib/rdoc/parsers/parse_c.rb
parent40ca06cb4bd5f1a2f411648b6a2b8fc9b80916a5 (diff)
Merged my changes from HEAD
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/parsers/parse_c.rb')
-rw-r--r--lib/rdoc/parsers/parse_c.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rdoc/parsers/parse_c.rb b/lib/rdoc/parsers/parse_c.rb
index 89d36c6c50..e43fb00829 100644
--- a/lib/rdoc/parsers/parse_c.rb
+++ b/lib/rdoc/parsers/parse_c.rb
@@ -212,6 +212,11 @@ module RDoc
$stderr.flush
end
+ def remove_private_comments(comment)
+ comment.gsub!(/\/?\*--(.*?)\/?\*\+\+/m, '')
+ comment.sub!(/\/?\*--.*/m, '')
+ end
+
# remove lines that are commented out that might otherwise get
# picked up when scanning for classes and methods
@@ -552,6 +557,8 @@ module RDoc
comment, params = $1, $2
body_text = $&
+ remove_private_comments(comment) if comment
+
# see if we can find the whole body
re = Regexp.escape(body_text) + '[^(]*^\{.*?^\}'