diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_class.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 96bca08601..034f4c6d20 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -755,4 +755,10 @@ class TestClass < Test::Unit::TestCase 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 end |