Fix ruby 2.* incompatibility in netstat functions
Change-Id: I1b920596597218a0fff24a7ad1be5f8f9b285384
This commit is contained in:
parent
d7b58f1856
commit
9ea60b8f2c
@ -58,7 +58,7 @@ module Facter::Util::NetStat
|
|||||||
c1 = map[:dest]
|
c1 = map[:dest]
|
||||||
c2 = map[label.to_sym]
|
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
|
if a[c1] == route
|
||||||
tmp1 << a[c2]
|
tmp1 << a[c2]
|
||||||
end
|
end
|
||||||
|
@ -58,7 +58,7 @@ module Facter::Util::NetStat
|
|||||||
c1 = map[:dest]
|
c1 = map[:dest]
|
||||||
c2 = map[label.to_sym]
|
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
|
if a[c1] == route
|
||||||
tmp1 << a[c2]
|
tmp1 << a[c2]
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user