1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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:
dave 2004-02-29 14:16:33 +00:00
parent 8a5dba33b2
commit 43d483d41d
2 changed files with 13 additions and 12 deletions

View file

@ -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>
* bcc32/Makefile.sub, bcc32/README.bcc32, bcc32/configure.bat,

View file

@ -1747,21 +1747,17 @@ module RDoc
when TkLSHFT
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)
else
other = TopLevel.find_class_named(name)
unless other
other = @top_level.add_class(NormalClass, name, nil)
other.record_location(@top_level)
end
parse_statements(other, SINGLE, &block)
other = TopLevel.find_class_named(name)
unless other
other = @top_level.add_class(NormalClass, name, nil)
other.record_location(@top_level)
other.comment = comment
end
read_documentation_modifiers(other, CLASS_MODIFIERS)
parse_statements(other, SINGLE, &block)
end
else