diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2021-06-10 17:22:45 -0700 |
---|---|---|
committer | John McCrae <john.mccrae@progress.com> | 2021-06-14 19:01:14 -0700 |
commit | 295977085f454f3b6bd73344cac3e967008f8049 (patch) | |
tree | 739f9521f47788a2232d7e7c607542f5837e1e33 | |
parent | 79059e7b77f467c83dd967ea18138ae643e8fa16 (diff) | |
download | chef-295977085f454f3b6bd73344cac3e967008f8049.tar.gz |
fix warnings
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | chef-utils/lib/chef-utils/parallel_map.rb | 2 | ||||
-rw-r--r-- | chef-utils/spec/unit/parallel_map_spec.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/chef-utils/lib/chef-utils/parallel_map.rb b/chef-utils/lib/chef-utils/parallel_map.rb index abc8279cc5..3c1be22006 100644 --- a/chef-utils/lib/chef-utils/parallel_map.rb +++ b/chef-utils/lib/chef-utils/parallel_map.rb @@ -45,7 +45,7 @@ module ChefUtils pool ||= ChefUtils::DefaultThreadPool.instance.pool futures = map do |item| - future = Concurrent::Future.execute(executor: pool) do + Concurrent::Future.execute(executor: pool) do yield item end end diff --git a/chef-utils/spec/unit/parallel_map_spec.rb b/chef-utils/spec/unit/parallel_map_spec.rb index 94a1b5342c..1346a9171e 100644 --- a/chef-utils/spec/unit/parallel_map_spec.rb +++ b/chef-utils/spec/unit/parallel_map_spec.rb @@ -112,7 +112,7 @@ RSpec.describe ChefUtils::ParallelMap do end it "recursive parallel_each will not deadlock" do - ans = Timeout.timeout(30) do + Timeout.timeout(30) do (1..2).parallel_each { |i| (1..2).parallel_each { |i| i } } end end @@ -125,7 +125,7 @@ RSpec.describe ChefUtils::ParallelMap do end it "parallel_each is lazy" do - ans = Timeout.timeout(30) do + Timeout.timeout(30) do (1..).lazy.parallel_each { |i| i }.first(5) end end |