Skip to content

Commit 51ff25e

Browse files
committed
Remove unused ClassModule#update_extends
1 parent 24a177d commit 51ff25e

File tree

2 files changed

+0
-76
lines changed

2 files changed

+0
-76
lines changed

lib/rdoc/code_object/class_module.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -830,22 +830,6 @@ def update_includes
830830
includes.uniq!
831831
end
832832

833-
##
834-
# Deletes from #extends those whose module has been removed from the
835-
# documentation.
836-
#--
837-
# FIXME: like update_includes, extends are not reliably removed
838-
839-
def update_extends
840-
extends.reject! do |ext|
841-
mod = ext.module
842-
843-
!(String === mod) && @store.modules_hash[mod.full_name].nil?
844-
end
845-
846-
extends.uniq!
847-
end
848-
849833
def embed_mixins
850834
return unless options.embed_mixins
851835

test/rdoc/test_rdoc_class_module.rb

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,66 +1466,6 @@ def test_update_includes_with_colons
14661466
assert_equal [a, c], @c1.includes
14671467
end
14681468

1469-
def test_update_extends
1470-
a = RDoc::Extend.new 'M1', nil
1471-
b = RDoc::Extend.new 'M2', nil
1472-
c = RDoc::Extend.new 'C', nil
1473-
1474-
@c1.add_extend a
1475-
@c1.add_extend b
1476-
@c1.add_extend c
1477-
@c1.each_extend do |extend| extend.module end # cache extended modules
1478-
1479-
@m1_m2.document_self = nil
1480-
assert @m1_m2.remove_from_documentation?
1481-
1482-
assert @store.modules_hash.key? @m1_m2.full_name
1483-
refute @store.modules_hash[@m1_m2.full_name].nil?
1484-
@store.remove_nodoc @store.modules_hash
1485-
refute @store.modules_hash.key? @m1_m2.full_name
1486-
1487-
@c1.update_extends
1488-
1489-
assert_equal [a, b, c], @c1.extends
1490-
end
1491-
1492-
def test_update_extends_trim
1493-
a = RDoc::Extend.new 'D::M', nil
1494-
b = RDoc::Extend.new 'D::M', nil
1495-
1496-
@c1.add_extend a
1497-
@c1.add_extend b
1498-
@c1.each_extend do |extend| extend.module end # cache extended modules
1499-
1500-
@c1.update_extends
1501-
1502-
assert_equal [a], @c1.extends
1503-
end
1504-
1505-
def test_update_extends_with_colons
1506-
a = RDoc::Extend.new 'M1', nil
1507-
b = RDoc::Extend.new 'M1::M2', nil
1508-
c = RDoc::Extend.new 'C', nil
1509-
1510-
@c1.add_extend a
1511-
@c1.add_extend b
1512-
@c1.add_extend c
1513-
@c1.each_extend do |extend| extend.module end # cache extended modules
1514-
1515-
@m1_m2.document_self = nil
1516-
assert @m1_m2.remove_from_documentation?
1517-
1518-
assert @store.modules_hash.key? @m1_m2.full_name
1519-
refute @store.modules_hash[@m1_m2.full_name].nil?
1520-
1521-
@store.remove_nodoc @store.modules_hash
1522-
refute @store.modules_hash.key? @m1_m2.full_name
1523-
1524-
@c1.update_extends
1525-
1526-
assert_equal [a, c], @c1.extends
1527-
end
1528-
15291469
def test_nesting_namespaces
15301470
cm1 = RDoc::ClassModule.new "A"
15311471
assert_equal ["A"], cm1.nesting_namespaces

0 commit comments

Comments
 (0)