aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_weakref.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_weakref.rb')
-rw-r--r--test/test_weakref.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_weakref.rb b/test/test_weakref.rb
index 129c1e6ed1..36b5d5bc51 100644
--- a/test/test_weakref.rb
+++ b/test/test_weakref.rb
@@ -60,4 +60,12 @@ class TestWeakRef < Test::Unit::TestCase
end
}, bug7304
end
+
+ def test_repeated_object_leak
+ bug10537 = '[ruby-core:66428]'
+ assert_no_memory_leak(%w(-rweakref), '', <<-'end;', bug10537)
+ a = Object.new
+ 150_000.times { WeakRef.new(a) }
+ end;
+ end
end