Mercurial > repos > other > Puppet
comparison modules/stdlib/lib/puppet/parser/functions/intersection.rb @ 424:4a2ee7e3b110
Update stdlib in case it fixed deprecation
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 09 Oct 2022 10:34:32 +0100 |
parents | d9352a684e62 |
children | adf6fe9bbc17 |
comparison
equal
deleted
inserted
replaced
423:a200bf678bec | 424:4a2ee7e3b110 |
---|---|
20 | 20 |
21 first = arguments[0] | 21 first = arguments[0] |
22 second = arguments[1] | 22 second = arguments[1] |
23 | 23 |
24 unless first.is_a?(Array) && second.is_a?(Array) | 24 unless first.is_a?(Array) && second.is_a?(Array) |
25 raise(Puppet::ParseError, 'intersection(): Requires 2 arrays') | 25 raise(Puppet::ParseError, "intersection(): Requires 2 arrays, got #{first.class} and #{second.class}") |
26 end | 26 end |
27 | 27 |
28 result = first & second | 28 result = first & second |
29 | 29 |
30 return result | 30 return result |