|
The following sample can be found in the the Puppet Specifications chapter on Expression, section on "- operator" / Delete:
[1,2,b] - {a => 1, b => 20} # => [2]
|
but when evaluating the expression in puppet, the result is [1, 2, b]. Internally, puppet does roughly this:
and since hash.to_a returns an array of 2-element arrays (key pairs) one of two things should change. Either the example should be changed into:
[[1,2],[b,20]] - {a => 1, b => 20} # => [[1,2]]
|
or the code should change to:
array - hash.to_a.flatten
|
|