Skip to content

Commit 3077d26

Browse files
committed
check if an argument supposed to be merged is empty to
pass over undefs without failing
1 parent 89bceb2 commit 3077d26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/puppet/parser/functions/merge.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module Puppet::Parser::Functions
2222
accumulator = Hash.new
2323
# Merge into the accumulator hash
2424
args.each do |arg|
25+
next if arg.empty? # empty string is synonym for puppet's undef
2526
unless arg.is_a?(Hash)
2627
raise Puppet::ParseError, "merge: unexpected argument type #{arg.class}, only expects hash arguments"
2728
end

0 commit comments

Comments
 (0)