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 | 1d271a6731aa1772fe35bcb6ac92013e9fe2cb9a (patch) | |
| tree | c6259b169662d721623d85dbf5fd85d4511a5913 /lib | |
| parent | a2e5c8fb1b7b265553eb9e3d674cca1bd6be0dc4 (diff) | |
| download | ruby-1d271a6731aa1772fe35bcb6ac92013e9fe2cb9a.tar.gz ruby-1d271a6731aa1772fe35bcb6ac92013e9fe2cb9a.tar.xz ruby-1d271a6731aa1772fe35bcb6ac92013e9fe2cb9a.zip | |
Handle :nodoc: om singleton classes
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -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 e3af27d3f..f9b0a19cd 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 |
