summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rdoc/rdoc.rb2
-rw-r--r--lib/rdoc/store.rb12
-rw-r--r--test/rdoc/test_rdoc_store.rb20
3 files changed, 0 insertions, 34 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
index a910215ff6..88ae55b409 100644
--- a/lib/rdoc/rdoc.rb
+++ b/lib/rdoc/rdoc.rb
@@ -415,8 +415,6 @@ The internal error was:
parse_file filename
end.compact
- @store.resolve_c_superclasses
-
@stats.done_adding
@options = original_options
diff --git a/lib/rdoc/store.rb b/lib/rdoc/store.rb
index e85bc9d33a..cd27d47dd1 100644
--- a/lib/rdoc/store.rb
+++ b/lib/rdoc/store.rb
@@ -198,18 +198,6 @@ class RDoc::Store
end
##
- # Make sure any references to C variable names are resolved to the corresponding class.
- #
-
- def resolve_c_superclasses
- @classes_hash.each_value do |klass|
- if klass.superclass.is_a?(String) && (candidate = find_c_enclosure(klass.superclass))
- klass.superclass = candidate
- end
- end
- end
-
- ##
# Sets the parser of +absolute_name+, unless it from a source code file.
def update_parser_of_file(absolute_name, parser)
diff --git a/test/rdoc/test_rdoc_store.rb b/test/rdoc/test_rdoc_store.rb
index 2665f163e4..50e8667d81 100644
--- a/test/rdoc/test_rdoc_store.rb
+++ b/test/rdoc/test_rdoc_store.rb
@@ -281,26 +281,6 @@ class TestRDocStore < XrefTestCase
assert_nil @s.find_c_enclosure('cObject')
end
- def test_resolve_c_superclasses
- # first parse a child that references an unknown parent
- c_file1 = @s.add_file 'ext1.c'
- c_file1.add_class RDoc::NormalClass, 'Child', 'cExternParent'
-
- # then parse the parent and register the C variable name as a C enclosure
- c_file2 = @s.add_file 'ext2.c'
- parent = c_file2.add_class RDoc::NormalClass, 'Parent', 'rb_cObject'
-
- @s.add_c_enclosure('cExternParent', parent)
-
- # at this point, the child's superclass is still the name of the C variable
- assert_equal("cExternParent", @s.classes_hash['Child'].superclass)
-
- @s.resolve_c_superclasses
-
- # now the ancestor tree correctly references the NormalClass objects
- assert_equal(parent, @s.classes_hash['Child'].superclass)
- end
-
def test_find_class_named
assert_equal @c1, @store.find_class_named('C1')