X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fkeys.rb;fp=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fkeys.rb;h=f3663b7b08f210dfdbe09adf45f4bc96170f9a96;hb=131e09855e065be940e104d9ab0f18940cc76257;hp=199e31906c8f8c77766718b5a6d00d2d75a342a4;hpb=407d322498f4fde815abf381007fbecfe5c10b2b;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/keys.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/keys.rb index 199e31906..f3663b7b0 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/keys.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/keys.rb @@ -1,14 +1,16 @@ # # keys.rb # - module Puppet::Parser::Functions - newfunction(:keys, :type => :rvalue, :doc => <<-EOS -Returns the keys of a hash as an array. - EOS - ) do |arguments| + newfunction(:keys, :type => :rvalue, :doc => <<-DOC + Returns the keys of a hash as an array. + + Note: from Puppet 5.5.0, the compatible function with the same name in Puppet core + will be used instead of this function. + DOC + ) do |arguments| - raise(Puppet::ParseError, "keys(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 + raise(Puppet::ParseError, "keys(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty? hash = arguments[0]