Age | Commit message (Collapse) | Author |
|
|
|
pass over undefs without failing
|
|
This commit replaces the example in the merge function with a much clearer
one. It also mentions that the rightmost value wins in the event of duplicated
hash keys.
|
|
The previous behavior of the merge() function used Array#inject with two
arguments. Ruby 1.8.5 only supports inject being used with one
argument.
This change initializes and empty Hash object and merges each argument
into the accumulator. The last argument still "wins" in the merge.
rspec tests (cd spec; rspec **/*_spec.rb) verified as passing with this
change.
Reviewed-by: Dan Bode
|
|
In Puppet, it is not possible to reassign hash
values.
This function allows a reasonable way to perform
hash munging in Puppet.
Reviewed-by: Jeff McCune
|