]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
check if an argument supposed to be merged is empty to
authorMartin Hellmich <mhellmic@gmail.com>
Mon, 22 Apr 2013 21:26:22 +0000 (23:26 +0200)
committerMartin Hellmich <mhellmic@gmail.com>
Mon, 22 Apr 2013 21:26:22 +0000 (23:26 +0200)
pass over undefs without failing

lib/puppet/parser/functions/merge.rb

index 6ec085eb10d4c29422022b5f0b2a9394d3e28e69..54d1c1c2d93e2d30274903dca5dbf31475f889bb 100644 (file)
@@ -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