From 8da182b5bf18eee8e80ed0d0f5011544e2b1d9f4 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Mon, 28 Sep 2026 13:59:25 +0900 Subject: [PATCH] test_extractor: fix Rubocop error (#5506) **Which issue(s) this PR fixes**: Fixes # **What this PR does / why we need it**: This fix following error: ``` test/plugin/test_extractor.rb:40:5: C: [Correctable] Performance/TimesMap: Use Array.new(size) with a block instead of .times.map only if size is always 0 or more. size.times.map { random.rand(36).to_s(36) }.join ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 460 files inspected, 1 offense detected, 1 more offense can be corrected with `rubocop -A` ``` **Docs Changes**: **Release Note**: Signed-off-by: Shizuo Fujita Signed-off-by: github-actions[bot] --- test/plugin/test_extractor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin/test_extractor.rb b/test/plugin/test_extractor.rb index 70f9d2a5b5..7f78d265bc 100644 --- a/test/plugin/test_extractor.rb +++ b/test/plugin/test_extractor.rb @@ -37,7 +37,7 @@ def create_deflate(data) def incompressible_text(size) random = Random.new(0) - size.times.map { random.rand(36).to_s(36) }.join + Array.new(size) { random.rand(36).to_s(36) }.join end sub_test_case 'decompress_gzip' do