aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_symbol.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-07 02:51:58 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-07 02:51:58 +0900
commit01e0e4c4732b2019166a45b21fbf2b400554e403 (patch)
tree96a7feadceb50680247833486f924d16012741f9 /test/ruby/test_symbol.rb
parenteb0125957b3c32727a7c199f1f3041c1d2b9a475 (diff)
downloadruby-01e0e4c4732b2019166a45b21fbf2b400554e403.tar.gz
Cut down warm-up loops and gain main/warm-up ratio
Diffstat (limited to 'test/ruby/test_symbol.rb')
-rw-r--r--test/ruby/test_symbol.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index 569b888f31..ff246f137a 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -525,10 +525,12 @@ class TestSymbol < Test::Unit::TestCase
def test_symbol_fstr_leak
bug10686 = '[ruby-core:67268] [Bug #10686]'
- x = x = 0
- assert_no_memory_leak([], '200_000.times { |i| i.to_s.to_sym }; GC.start', "#{<<-"begin;"}\n#{<<-"end;"}", bug10686, limit: 1.71, rss: true, timeout: 20)
+ assert_no_memory_leak([], "#{<<~"begin;"}\n#{<<~'else;'}", "#{<<~'end;'}", bug10686, limit: 1.71, rss: true, timeout: 20)
begin;
- 200_000.times { |i| (i + 200_000).to_s.to_sym }
+ n = 100_000
+ n.times { |i| i.to_s.to_sym }
+ else;
+ (2 * n).times { |i| (i + n).to_s.to_sym }
end;
end