summaryrefslogtreecommitdiff
path: root/lib/rdoc/parser/ruby.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/parser/ruby.rb')
-rw-r--r--lib/rdoc/parser/ruby.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb
index e6f07d66da..bec88bc52d 100644
--- a/lib/rdoc/parser/ruby.rb
+++ b/lib/rdoc/parser/ruby.rb
@@ -224,9 +224,11 @@ class RDoc::Parser::Ruby < RDoc::Parser
##
# Look for a 'call-seq' in the comment, and override the normal parameter
# stuff
+ #--
+ # TODO handle undent
def extract_call_seq(comment, meth)
- if comment.sub!(/:?call-seq:(.*?)^\s*\#?\s*$/m, '') then
+ if comment.sub!(/:?call-seq:(.*?)(^\s*#?\s*$|\z)/m, '') then
seq = $1
seq.gsub!(/^\s*\#\s*/, '')
meth.call_seq = seq
@@ -779,6 +781,8 @@ class RDoc::Parser::Ruby < RDoc::Parser
@stats.add_attribute att
end
+
+ true
end
##
@@ -1230,10 +1234,10 @@ class RDoc::Parser::Ruby < RDoc::Parser
if TkCOMMENT === tk then
if non_comment_seen then
# Look for RDoc in a comment about to be thrown away
- parse_comment container, tk, comment unless comment.empty?
+ non_comment_seen = parse_comment container, tk, comment unless
+ comment.empty?
comment = ''
- non_comment_seen = false
end
while TkCOMMENT === tk do
@@ -1360,6 +1364,11 @@ class RDoc::Parser::Ruby < RDoc::Parser
return
end
+ else
+ non_comment_seen = parse_comment container, tk, comment unless
+ comment.empty?
+
+ comment = ''
end
comment = '' unless keep_comment