summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-05-18 11:28:36 -0700
committerTim Smith <tsmith@chef.io>2018-05-18 11:28:36 -0700
commit5cd8682a6ec9fd3d223c9085b2dea3679a2d9f1a (patch)
treea3ab7414a59edb7609d77dbfe859dbc45d706613
parent8849eecbb7d1916d767f58c924f2508eef361a87 (diff)
downloadohai-5cd8682a6ec9fd3d223c9085b2dea3679a2d9f1a.tar.gz
Remove unnecessary each_with_index for simple each
The index was unused here. No reason to track that for nothing. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/plugins/solaris2/cpu.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/solaris2/cpu.rb b/lib/ohai/plugins/solaris2/cpu.rb
index 39dccc42..35322f72 100644
--- a/lib/ohai/plugins/solaris2/cpu.rb
+++ b/lib/ohai/plugins/solaris2/cpu.rb
@@ -30,7 +30,7 @@ Ohai.plugin(:CPU) do
currentcpu = 0
cpucores = Array.new
cpusockets = Array.new
- processor_info.each_with_index do |processor, i|
+ processor_info.each do |processor|
_desc, instance, _record, keyvalue = processor.split(":")
cpu[instance] ||= Mash.new
if currentcpu != instance