diff options
Diffstat (limited to 'lib/chef/provider/ifconfig.rb')
-rw-r--r-- | lib/chef/provider/ifconfig.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/ifconfig.rb b/lib/chef/provider/ifconfig.rb index c8da5e255f..4eb1f28b79 100644 --- a/lib/chef/provider/ifconfig.rb +++ b/lib/chef/provider/ifconfig.rb @@ -55,7 +55,7 @@ class Chef @net_tools_version = shell_out("ifconfig --version") @net_tools_version.stderr.each_line do |line| - if line =~ /^net-tools (\d+.\d+)/ + if line.match?(/^net-tools (\d+.\d+)/) @ifconfig_version = line.match(/^net-tools (\d+.\d+)/)[1] end end @@ -111,7 +111,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)[2] == "" |