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:
parent
e7ff825b64
commit
0ad6793740
2 changed files with 13 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue