diff options
author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-29 14:16:33 +0000 |
---|---|---|
committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-29 14:16:33 +0000 |
commit | 43d483d41d8b122c4fdc1bb6347f4172f2e5315a (patch) | |
tree | 19da8118e8519596d2b2fc7a3505953916094a70 /lib/rdoc/parsers | |
parent | 8a5dba33b2f602066d7aed696593340ba884fddd (diff) | |
download | ruby-43d483d41d8b122c4fdc1bb6347f4172f2e5315a.tar.gz |
Handle :nodoc: om singleton classes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/parsers')
-rw-r--r-- | lib/rdoc/parsers/parse_rb.rb | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb index e3af27d3f7..f9b0a19cd6 100644 --- a/lib/rdoc/parsers/parse_rb.rb +++ b/lib/rdoc/parsers/parse_rb.rb @@ -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 |