summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-09-08 11:46:40 -0700
committerTim Smith <tsmith84@gmail.com>2020-09-08 11:46:40 -0700
commit3485634758d5a5e16e3a579a77b6d18a1fab5176 (patch)
treed58cdbfb56ebfc576ffb42b5cc54d4ab072e3a56
parent149f7bdcd52a64df91bb3dc75877999ee5349172 (diff)
downloadohai-3485634758d5a5e16e3a579a77b6d18a1fab5176.tar.gz
Simplify respond_to?
There's no need for the &. here Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/plugins/solaris2/network.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/solaris2/network.rb b/lib/ohai/plugins/solaris2/network.rb
index 3f15bfcd..c4a223ff 100644
--- a/lib/ohai/plugins/solaris2/network.rb
+++ b/lib/ohai/plugins/solaris2/network.rb
@@ -86,7 +86,7 @@ Ohai.plugin(:Network) do
def full_interface_name(iface, part_name, index)
iface.each do |name, attrs|
- next unless attrs&.respond_to?(:[])
+ next unless attrs.respond_to?(:[])
return name if /^#{part_name}($|:)/.match(name) && attrs[:index] == index
end