Handle :nodoc: om singleton classes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8a5dba33b2
commit
43d483d41d
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 29 23:14:53 2004 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
|
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class):
|
||||||
|
Handle :nodoc: on singleton classes.
|
||||||
|
|
||||||
Sat Feb 28 21:50:20 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
Sat Feb 28 21:50:20 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||||
|
|
||||||
* bcc32/Makefile.sub, bcc32/README.bcc32, bcc32/configure.bat,
|
* bcc32/Makefile.sub, bcc32/README.bcc32, bcc32/configure.bat,
|
||||||
|
@ -1747,22 +1747,18 @@ module RDoc
|
|||||||
|
|
||||||
when TkLSHFT
|
when TkLSHFT
|
||||||
case name = get_class_specification
|
case name = get_class_specification
|
||||||
when "self"
|
when "self", container.name
|
||||||
parse_statements(container, SINGLE, &block)
|
|
||||||
else
|
|
||||||
|
|
||||||
# Special case: class << X inside class 'X' adds singleton methods
|
|
||||||
if name == container.name
|
|
||||||
parse_statements(container, SINGLE, &block)
|
parse_statements(container, SINGLE, &block)
|
||||||
else
|
else
|
||||||
other = TopLevel.find_class_named(name)
|
other = TopLevel.find_class_named(name)
|
||||||
unless other
|
unless other
|
||||||
other = @top_level.add_class(NormalClass, name, nil)
|
other = @top_level.add_class(NormalClass, name, nil)
|
||||||
other.record_location(@top_level)
|
other.record_location(@top_level)
|
||||||
|
other.comment = comment
|
||||||
end
|
end
|
||||||
|
read_documentation_modifiers(other, CLASS_MODIFIERS)
|
||||||
parse_statements(other, SINGLE, &block)
|
parse_statements(other, SINGLE, &block)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
else
|
else
|
||||||
warn("Expected class name or '<<'. Got #{name_t.class}: #{name_t.text.inspect}")
|
warn("Expected class name or '<<'. Got #{name_t.class}: #{name_t.text.inspect}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user