summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_class.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 4ae230f91e..eb448e952a 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -769,4 +769,13 @@ class TestClass < Test::Unit::TestCase
assert(c.descendants.size <= 100)
end
end
+
+ def test_classext_memory_leak
+ assert_no_memory_leak([], <<-PREP, <<-CODE, rss: true)
+code = proc { Class.new }
+1_000.times(&code)
+PREP
+3_000_000.times(&code)
+CODE
+ end
end