summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-06-10 17:22:45 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2021-06-10 17:22:45 -0700
commit42d25566129770a9bf08dce496b18c8d9625ec77 (patch)
treefc5728bb728a45989a3579e701038a35a2bd36e1
parent07b755cc95f151a6f8f0d2ad42b4407019a36257 (diff)
downloadchef-42d25566129770a9bf08dce496b18c8d9625ec77.tar.gz
fix warnings
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--chef-utils/lib/chef-utils/parallel_map.rb2
-rw-r--r--chef-utils/spec/unit/parallel_map_spec.rb4
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