puppetlabs/puppetlabs-stdlib — pull request #220 by jburnham (2014-02-17 20:21:14+00:00)
Title: PUP-1724 Don't modify the paramaters to deep_merge

Instead of modifying the first paramater of deep_merge due to the
use of the merge! function, instead use merge to return a copy of
the merged object. This allows one to continue to use the original
first parameter after the call to deep_merge.

Example:
```puppet
class foo {
$bar = { foo => { bar => 1 } }
}
include foo
$bar_updates = { foo => { baz => 1 } }
alert $foo::bar
$baz = deep_merge( $foo::bar, $bar_updates )
alert $foo::bar
```
Current output:
```puppet
alert: Scope(Class[main]): foobar1
alert: Scope(Class[main]): foobaz1bar1
```
Expected:
```puppet
alert: Scope(Class[main]): foobar1
alert: Scope(Class[main]): foobar1
```