From d3ff43852b22f5463d22aab390ef340d9ebe4b06 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 29 Jun 2023 15:25:31 -0400 Subject: Fix memory leak in Hash#replace Hash#replace can leak memory if the receiver has an ST table. --- test/ruby/test_hash.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby') diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index e66beef29f..9121f3539e 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -1325,7 +1325,7 @@ class TestHash < Test::Unit::TestCase end def test_replace_memory_leak - assert_no_memory_leak([], "#{<<-"begin;"}", "#{<<-'end;'}") + assert_no_memory_leak([], "#{<<-"begin;"}", "#{<<-'end;'}", rss: true) h = ("aa".."zz").each_with_index.to_h 10_000.times {h.dup} begin; -- cgit v1.2.3