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/branches/ruby_1_8@5854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
dave 2004-02-29 14:16:33 +00:00
parent e7ff825b64
commit 0ad6793740
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 10:58:49 2004 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* MANIFEST: add test_erb.rb

View file

@ -1747,22 +1747,18 @@ module RDoc
when TkLSHFT
case name = get_class_specification
when "self"
parse_statements(container, SINGLE, &block)
else
# Special case: class << X inside class 'X' adds singleton methods
if name == container.name
when "self", 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)
other.comment = comment
end
read_documentation_modifiers(other, CLASS_MODIFIERS)
parse_statements(other, SINGLE, &block)
end
end
else
warn("Expected class name or '<<'. Got #{name_t.class}: #{name_t.text.inspect}")