Skip to content

Commit

Permalink
Use the same capacities for memory leak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jun 28, 2023
1 parent 8aedfef commit 3e08a53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/ruby/test_string.rb
Expand Up @@ -100,7 +100,7 @@ def test_initialize_memory_leak
return unless @cls == String

assert_no_memory_leak([], <<-PREP, <<-CODE, rss: true)
code = proc {('x'*100000).__send__(:initialize, '')}
code = proc {('x'*100_000).__send__(:initialize, '')}
1_000.times(&code)
PREP
100_000.times(&code)
Expand All @@ -112,7 +112,7 @@ def test_initialize_nofree_memory_leak
return unless @cls == String

assert_no_memory_leak([], <<-PREP, <<-CODE, rss: true)
code = proc {0.to_s.__send__(:initialize, capacity: 10000)}
code = proc {0.to_s.__send__(:initialize, capacity: 100_000)}
1_000.times(&code)
PREP
100_000.times(&code)
Expand Down

0 comments on commit 3e08a53

Please sign in to comment.