From 61503bbf3be79ea46a4147fb135032e2dacee95c Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 11 Sep 2004 07:11:46 +0000 Subject: [PATCH] Fix up cross-file class merging git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/rdoc/code_objects.rb | 6 ++++++ lib/rdoc/parsers/parse_rb.rb | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2604a75366..a7a6141841 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Sep 11 16:09:46 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb: Fix up cross-file class merging. + Fri Sep 10 20:18:05 2004 Hirokazu Yamamoto * ext/tcltklib/tcltklib.c (lib_merge_tklist): fix suspicious diff --git a/lib/rdoc/code_objects.rb b/lib/rdoc/code_objects.rb index 82872db14d..55b1cfa656 100644 --- a/lib/rdoc/code_objects.rb +++ b/lib/rdoc/code_objects.rb @@ -477,6 +477,12 @@ module RDoc nil end + # Find a named module + def find_module_named(name) + find_class_or_module_named(name) || find_enclosing_module_named(name) + end + + end # ClassModule is the base class for objects representing either a diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb index 8a1ecc612c..90194e0699 100644 --- a/lib/rdoc/parsers/parse_rb.rb +++ b/lib/rdoc/parsers/parse_rb.rb @@ -1760,7 +1760,7 @@ module RDoc else cls_type = NormalClass end - + cls = container.add_class(cls_type, name, superclass) read_documentation_modifiers(cls, CLASS_MODIFIERS) cls.record_location(@top_level)