From b8f7b97321b6dd7ba62f6ffe6138ef906b37c57d Mon Sep 17 00:00:00 2001 From: drbrain Date: Tue, 23 Dec 2008 05:16:54 +0000 Subject: [PATCH] Don't coalesce adjacent comment blocks. [bug#901] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/rdoc/parser/c.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 568c65d91c..624fc4a0b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Dec 23 13:52:05 2008 Eric Hodel + + * lib/rdoc/parser/c.rb: Don't coalesce adjacent comment blocks. + [bug#901] + Tue Dec 23 12:00:00 2008 Tanaka Akira * io.c (pipe_close): fix coding style. [ruby-dev:37554] diff --git a/lib/rdoc/parser/c.rb b/lib/rdoc/parser/c.rb index 9061841bec..933838debd 100644 --- a/lib/rdoc/parser/c.rb +++ b/lib/rdoc/parser/c.rb @@ -270,7 +270,7 @@ class RDoc::Parser::C < RDoc::Parser def find_body(class_name, meth_name, meth_obj, body, quiet = false) case body - when %r"((?>/\*.*?\*/\s*)*)(?:(?:static|SWIGINTERN)\s+)?(?:intern\s+)?VALUE\s+#{meth_name} + when %r"((?>/\*.*?\*/\s*))(?:(?:static|SWIGINTERN)\s+)?(?:intern\s+)?VALUE\s+#{meth_name} \s*(\([^)]*\))([^;]|$)"xm comment, params = $1, $2 body_text = $& @@ -425,7 +425,7 @@ class RDoc::Parser::C < RDoc::Parser def find_override_comment(class_name, meth_name) name = Regexp.escape(meth_name) - if @content =~ %r{Document-method:\s+#{class_name}(?:\.|::)#{name}\s*?\n((?>.*?\*/))}m then + if @content =~ %r{Document-method:\s+#{class_name}(?:\.|::|#)#{name}\s*?\n((?>.*?\*/))}m then $1 elsif @content =~ %r{Document-method:\s#{name}\s*?\n((?>.*?\*/))}m then $1