mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
Add tests for bug 17652
This commit is contained in:
parent
a80366c922
commit
59fb5d4fa3
Notes:
git
2021-02-25 05:26:00 +09:00
1 changed files with 16 additions and 0 deletions
|
@ -60,6 +60,22 @@ class TestGCCompact < Test::Unit::TestCase
|
|||
GC.auto_compact = before
|
||||
end
|
||||
|
||||
def test_bug_17652
|
||||
assert_in_out_err([], "#{<<~"{#"}#{<<~'};'}", timeout: 60)
|
||||
{#
|
||||
GC.auto_compact = true
|
||||
|
||||
times = 20_000_000
|
||||
arr = Array.new(times)
|
||||
times.times do |i|
|
||||
arr[i] = "#{i}"
|
||||
end
|
||||
|
||||
arr = Array.new(1_000_000, 42)
|
||||
GC.start
|
||||
};
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def supports_auto_compact?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue