aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/rdoc/parsers/parse_rb.rb20
2 files changed, 13 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c00968bd0..4ff341ed43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,
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