summaryrefslogtreecommitdiff
path: root/lib/chef/provider/ifconfig.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/ifconfig.rb')
-rw-r--r--lib/chef/provider/ifconfig.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/ifconfig.rb b/lib/chef/provider/ifconfig.rb
index 63aa126c2e..30fe4c2545 100644
--- a/lib/chef/provider/ifconfig.rb
+++ b/lib/chef/provider/ifconfig.rb
@@ -120,7 +120,7 @@ class Chef
@status = shell_out("ifconfig")
@status.stdout.each_line do |line|
addr_regex = /^((\w|-)+):?(\d*):?\ .+$/
- if line =~ addr_regex
+ if line&.match?(addr_regex)
if line.match(addr_regex).nil?
@int_name = "nil"
elsif line.match(addr_regex)[3] == ""