Fix ruby 2.* incompatibility in netstat functions

Change-Id: I1b920596597218a0fff24a7ad1be5f8f9b285384
This commit is contained in:
Dmitry Ilyin 2014-04-15 16:22:05 +04:00
parent d7b58f1856
commit 9ea60b8f2c
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ module Facter::Util::NetStat
c1 = map[:dest]
c2 = map[label.to_sym]
get_ipv4_output.to_a.collect { |s| s.split}.each { |a|
get_ipv4_output.split("\n").map { |l| l.split }.each { |a|
if a[c1] == route
tmp1 << a[c2]
end

View File

@ -58,7 +58,7 @@ module Facter::Util::NetStat
c1 = map[:dest]
c2 = map[label.to_sym]
get_ipv4_output.to_a.collect { |s| s.split}.each { |a|
get_ipv4_output.split("\n").map { |s| s.split}.each { |a|
if a[c1] == route
tmp1 << a[c2]
end