diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_module.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 425cbdf031..dd8cc471d0 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -3318,6 +3318,18 @@ class TestModule < Test::Unit::TestCase CODE end + def test_module_clone_memory_leak + # [Bug #19901] + assert_no_memory_leak([], <<~PREP, <<~CODE, rss: true) + code = proc do + Module.new.clone + end + 1_000.times(&code) + PREP + 1_000_000.times(&code) + CODE + end + private def assert_top_method_is_private(method) |
