summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/scope.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/scope.rb')
-rw-r--r--lib/puppet/parser/scope.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index eda53a8cb..12c645a90 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -336,8 +336,11 @@ class Puppet::Parser::Scope
# lookup the value in the scope if it exists and insert the var
table[name] = lookupvar(name)
# concatenate if string, append if array, nothing for other types
- if value.is_a?(Array)
+ case value
+ when Array
table[name] += value
+ when Hash
+ table[name].merge!(value)
else
table[name] << value
end