summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-24 03:35:24 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-24 03:35:24 +0000
commitf6ccae29c36ebed51c1ee7b5471489ebda4240dc (patch)
treee6805a6d6e1e2dbb03ff445443f6416786ce1df9
parent498aa386f7b9653be0816a6d0271405bfabd1049 (diff)
downloadruby-f6ccae29c36ebed51c1ee7b5471489ebda4240dc.tar.gz
ruby-f6ccae29c36ebed51c1ee7b5471489ebda4240dc.tar.xz
ruby-f6ccae29c36ebed51c1ee7b5471489ebda4240dc.zip
Don't be as eager to invent classes to document
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--lib/rdoc/parsers/parse_c.rb4
-rw-r--r--lib/rdoc/parsers/parse_rb.rb7
3 files changed, 17 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 594a677d5..190f48322 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Wed Mar 24 12:32:56 2004 Dave Thomas <dave@pragprog.com>
+
+ * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::handle_class_module):
+ Don't document methods if we don't know for sure the
+ class or module.
+
+ * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class):
+ Don't store documentation for singleton classes if we
+ don't know the real class.
+
Wed Mar 24 11:11:26 2004 Dave Thomas <dave@pragprog.com>
* lib/rdoc/generators/html_generator.rb (Generators::HTMLGenerator::load_html_template):
diff --git a/lib/rdoc/parsers/parse_c.rb b/lib/rdoc/parsers/parse_c.rb
index 2b12411ae..200519a78 100644
--- a/lib/rdoc/parsers/parse_c.rb
+++ b/lib/rdoc/parsers/parse_c.rb
@@ -340,8 +340,10 @@ module RDoc
meth_body, param_count, source_file = nil)
@stats.num_methods += 1
+ class_name = @known_classes[var_name]
+
+ return unless class_name
- class_name = @known_classes[var_name] || var_name
class_obj = find_class(var_name, class_name)
if class_obj
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index f7c5a32df..e5276bf6c 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -1752,9 +1752,10 @@ module RDoc
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
+# other = @top_level.add_class(NormalClass, name, nil)
+# other.record_location(@top_level)
+# other.comment = comment
+ other = NormalClass.new("Dummy", nil)
end
read_documentation_modifiers(other, CLASS_MODIFIERS)
parse_statements(other, SINGLE, &block)