summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorMartin Hellmich <mhellmic@gmail.com>2013-04-22 23:26:22 +0200
committerMartin Hellmich <mhellmic@gmail.com>2013-04-22 23:26:22 +0200
commit3077d26b00b170ef2c5c808831577d421613b198 (patch)
tree3a92cd65686c76f7bc81015591d1d8579d7b372f /lib/puppet/parser/functions
parent89bceb2821d82c64434e6529de48ec7d7389a13e (diff)
downloadpuppet-stdlib-3077d26b00b170ef2c5c808831577d421613b198.tar.gz
puppet-stdlib-3077d26b00b170ef2c5c808831577d421613b198.tar.bz2
check if an argument supposed to be merged is empty to
pass over undefs without failing
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r--lib/puppet/parser/functions/merge.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/merge.rb b/lib/puppet/parser/functions/merge.rb
index 6ec085e..54d1c1c 100644
--- a/lib/puppet/parser/functions/merge.rb
+++ b/lib/puppet/parser/functions/merge.rb
@@ -22,6 +22,7 @@ module Puppet::Parser::Functions
accumulator = Hash.new
# Merge into the accumulator hash
args.each do |arg|
+ next if arg.empty? # empty string is synonym for puppet's undef
unless arg.is_a?(Hash)
raise Puppet::ParseError, "merge: unexpected argument type #{arg.class}, only expects hash arguments"
end