summaryrefslogtreecommitdiff
path: root/lib/puppet/provider
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-05-26 16:19:56 -0400
committerMicah Anderson <micah@riseup.net>2013-05-26 16:19:56 -0400
commit966f3b349a60b3997e58af1095bbd96671952fac (patch)
tree3c1dcdb0cd353427eb066f6926610445700a2a66 /lib/puppet/provider
parent66e0fa8f1bc5062e9d753598ad17602c378a2994 (diff)
parent9c8c8275abd76878d38a0f6f3af52dc468656283 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'lib/puppet/provider')
-rw-r--r--lib/puppet/provider/file_line/ruby.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/provider/file_line/ruby.rb b/lib/puppet/provider/file_line/ruby.rb
index e21eaa8..a3219d3 100644
--- a/lib/puppet/provider/file_line/ruby.rb
+++ b/lib/puppet/provider/file_line/ruby.rb
@@ -34,7 +34,7 @@ Puppet::Type.type(:file_line).provide(:ruby) do
def handle_create_with_match()
regex = resource[:match] ? Regexp.new(resource[:match]) : nil
- match_count = lines.select { |l| regex.match(l) }.count
+ match_count = lines.select { |l| regex.match(l) }.size
if match_count > 1
raise Puppet::Error, "More than one line in file '#{resource[:path]}' matches pattern '#{resource[:match]}'"
end