summaryrefslogtreecommitdiff
path: root/test/ruby/test_class.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_class.rb')
-rw-r--r--test/ruby/test_class.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 28285705bf..07c34ce9d5 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -738,38 +738,6 @@ class TestClass < Test::Unit::TestCase
assert_same(c, Module.new.const_set(:Foo, c))
end
- def test_descendants
- c = Class.new
- sc = Class.new(c)
- ssc = Class.new(sc)
- [c, sc, ssc].each do |k|
- k.include Module.new
- k.new.define_singleton_method(:force_singleton_class){}
- end
- assert_equal([sc, ssc], c.descendants)
- assert_equal([ssc], sc.descendants)
- assert_equal([], ssc.descendants)
-
- object_descendants = Object.descendants
- assert_include(object_descendants, c)
- assert_include(object_descendants, sc)
- assert_include(object_descendants, ssc)
- end
-
- def test_descendants_gc
- c = Class.new
- 100000.times { Class.new(c) }
- assert(c.descendants.size <= 100000)
- end
-
- def test_descendants_gc_stress
- 10000.times do
- c = Class.new
- 100.times { Class.new(c) }
- assert(c.descendants.size <= 100)
- end
- end
-
def test_subclasses
c = Class.new
sc = Class.new(c)