diff options
author | Adrien Thebo <git@somethingsinistral.net> | 2013-05-15 10:58:04 -0700 |
---|---|---|
committer | Adrien Thebo <git@somethingsinistral.net> | 2013-05-15 10:58:04 -0700 |
commit | dad3a2948fb9ebc5c45975340bc8796c9c041d9a (patch) | |
tree | ec211cd78e4b7f01d4ef52f2cc488258d60899f2 /lib/puppet/parser/functions | |
parent | 1ffd72daaaf21e71e762b6cd543043680bdb6694 (diff) | |
parent | b975bd66aa7345a5eeb54eb79dd0f708934609f8 (diff) | |
download | puppet-stdlib-dad3a2948fb9ebc5c45975340bc8796c9c041d9a.tar.gz puppet-stdlib-dad3a2948fb9ebc5c45975340bc8796c9c041d9a.tar.bz2 |
Merge pull request #147 from mhellmic/master
don't fail on undef variable in merge
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r-- | lib/puppet/parser/functions/merge.rb | 1 |
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..1b39f20 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.is_a? String and 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 |