diff options
author | tphoney <tp@puppet.com> | 2017-07-14 10:14:04 +0100 |
---|---|---|
committer | tphoney <tp@puppet.com> | 2017-07-14 10:42:10 +0100 |
commit | 33922a4ec7a8c204a17e0c3017eea21faa220f39 (patch) | |
tree | 069c400254276e50176e5b11140c77f831590879 /lib/puppet/parser | |
parent | 01d3004f0a6a1c662aea90edd5b1524139706c61 (diff) |
FM-6239 clean up for puppet 5.tests/deprecation
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/unique.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/unique.rb b/lib/puppet/parser/functions/unique.rb index b57431d..1e2a895 100644 --- a/lib/puppet/parser/functions/unique.rb +++ b/lib/puppet/parser/functions/unique.rb @@ -24,6 +24,10 @@ This returns: EOS ) do |arguments| + if Puppet::Util::Package.versioncmp(Puppet.version, '5.0.0') >= 0 + function_deprecation([:unique, 'This method is deprecated, please use the core puppet unique function. There is further documentation for the function in the release notes of Puppet 5.0.']) + end + raise(Puppet::ParseError, "unique(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 value = arguments[0] |