aboutsummaryrefslogtreecommitdiff
path: root/files/functions/gsub.rb
diff options
context:
space:
mode:
authordavid <david@f03ff2f1-f02d-0410-970d-b9634babeaa1>2007-08-07 11:42:33 +0000
committerdavid <david@f03ff2f1-f02d-0410-970d-b9634babeaa1>2007-08-07 11:42:33 +0000
commit9b9856b60e823a431e9ea06b42da64c231eeef36 (patch)
tree793bf4dd47ba614088c6d3242c1081b236bcf3ba /files/functions/gsub.rb
parent5c3b366b7b1d4347b3a596019a50482b849d16a6 (diff)
downloadpuppet-common-9b9856b60e823a431e9ea06b42da64c231eeef36.tar.gz
puppet-common-9b9856b60e823a431e9ea06b42da64c231eeef36.tar.bz2
fix "fail on no ntp_ plugins" bug
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@176 f03ff2f1-f02d-0410-970d-b9634babeaa1
Diffstat (limited to 'files/functions/gsub.rb')
-rw-r--r--files/functions/gsub.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/files/functions/gsub.rb b/files/functions/gsub.rb
index 743a700..371820f 100644
--- a/files/functions/gsub.rb
+++ b/files/functions/gsub.rb
@@ -1,7 +1,13 @@
# generic gsub call
module Puppet::Parser::Functions
newfunction(:gsub, :type => :rvalue) do |args|
- args[0].gsub(/#{args[1]}/, args[2])
+ if args[0].is_a?(Array)
+ args[0].collect do |val|
+ val.gsub(/#{args[1]}/, args[2])
+ end
+ else
+ args[0].gsub(/#{args[1]}/, args[2])
+ end
end
end