mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Some Ruby source uses Init_xxx (lower case for the class name)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9eca8a4a5f
commit
e554664426
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Sun Dec 28 00:46:25 2003 Dave Thomas <dave@pragprog.com>
|
||||
|
||||
* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_class_comment):
|
||||
Some Ruby source uses lower-case class names for the
|
||||
Init_Xxx C function name.
|
||||
|
||||
Sat Dec 27 23:41:46 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* configure.in: fix "test: too many arguments" error.
|
||||
|
|
|
@ -185,7 +185,7 @@ module RDoc
|
|||
def find_class_comment(class_name, class_meth)
|
||||
comment = nil
|
||||
if @body =~ %r{((?>/\*.*?\*/\s+))
|
||||
(static\s+)?void\s+Init_#{class_name}\s*\(\)}xm
|
||||
(static\s+)?void\s+Init_#{class_name}\s*\(\)}xmi
|
||||
comment = $1
|
||||
elsif @body =~ %r{Document-(class|module):\s#{class_name}.*?\n((?>.*?\*/))}m
|
||||
comment = $2
|
||||
|
@ -332,6 +332,8 @@ module RDoc
|
|||
meth_obj.add_token(RubyToken::Token.new(1,1).set_text(body_text))
|
||||
meth_obj.comment = mangle_comment(comment)
|
||||
|
||||
else
|
||||
$stderr.puts "No definition for #{meth_name}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue