summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2024-12-02 09:39:53 +0900
committerHiroshi SHIBATA <[email protected]>2024-12-02 09:39:56 +0900
commit0fe82ae087130d7f360cc0607be93995cedbdb16 (patch)
tree93cde3d62eefae1cd4a7cae30ca4104e5cce6143 /test
parent1df52e097be6afe8e7cae14ad9d6eb0e335749b0 (diff)
Revert "[ruby/rdoc] fix: C variables should never show up in Ancestors tree"
This reverts commit 2923f42ed7622f6310c63aab4c0abf05402f9a04. https://github.com/ruby/actions/actions/runs/12108034481/job/33755653615#step:23:1031 ``` /home/runner/work/actions/actions/snapshot-master/lib/rdoc/code_object.rb:322:in 'RDoc::CodeObject#parent': undefined method 'find_class_or_module' for nil (NoMethodError) from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/code_object/class_module.rb:342:in 'RDoc::ClassModule#marshal_dump' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:878:in 'Marshal.dump' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:878:in 'block in RDoc::Store#save_class' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:877:in 'IO.open' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:877:in 'RDoc::Store#save_class' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:763:in 'block in RDoc::Store#save' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:762:in 'Array#each' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/store.rb:762:in 'RDoc::Store#save' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/generator/ri.rb:27:in 'RDoc::Generator::RI#generate' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:528:in 'block in RDoc::RDoc#generate' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:522:in 'Dir.chdir' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:522:in 'RDoc::RDoc#generate' from /home/runner/work/actions/actions/snapshot-master/lib/rdoc/rdoc.rb:501:in 'RDoc::RDoc#document' from ./tool/rdoc-srcdir:27:in '<main>' ```
Diffstat (limited to 'test')
-rw-r--r--test/rdoc/test_rdoc_store.rb20
1 files changed, 0 insertions, 20 deletions
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')