diff options
Diffstat (limited to 'lib/chef/provider/ifconfig.rb')
-rw-r--r-- | lib/chef/provider/ifconfig.rb | 2 |
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] == "" |