From e5ed7aab5472e13c320f301fd233532b608a9dc4 Mon Sep 17 00:00:00 2001 From: andersbs Date: Mon, 9 Mar 2015 15:32:52 +0100 Subject: [PATCH] Missed the collect. --- lib/facter/util/netstat.rb | 2 +- lib/puppet/provider/l3_if_downup/util/netstat.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/facter/util/netstat.rb b/lib/facter/util/netstat.rb index 95e8b1d..5faa7a0 100644 --- a/lib/facter/util/netstat.rb +++ b/lib/facter/util/netstat.rb @@ -58,7 +58,7 @@ def self.get_route_value(route, label) c1 = map[:dest] c2 = map[label.to_sym] - ((output = get_ipv4_output).respond_to?(:lines) ? output.lines.to_a : output.to_a). { |s| s.split}.each { |a| + ((output = get_ipv4_output).respond_to?(:lines) ? output.lines.to_a : output.to_a).collect { |s| s.split}.each { |a| if a[c1] == route tmp1 << a[c2] end diff --git a/lib/puppet/provider/l3_if_downup/util/netstat.rb b/lib/puppet/provider/l3_if_downup/util/netstat.rb index 95e8b1d..5faa7a0 100644 --- a/lib/puppet/provider/l3_if_downup/util/netstat.rb +++ b/lib/puppet/provider/l3_if_downup/util/netstat.rb @@ -58,7 +58,7 @@ def self.get_route_value(route, label) c1 = map[:dest] c2 = map[label.to_sym] - ((output = get_ipv4_output).respond_to?(:lines) ? output.lines.to_a : output.to_a). { |s| s.split}.each { |a| + ((output = get_ipv4_output).respond_to?(:lines) ? output.lines.to_a : output.to_a).collect { |s| s.split}.each { |a| if a[c1] == route tmp1 << a[c2] end