Skip to content

Re-add block support to deprecated top-level merge #1385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/puppet/functions/merge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
Puppet::Functions.create_function(:merge) do
dispatch :deprecation_gen do
repeated_param 'Any', :args
optional_block_param 'Variant[Callable[2,2], Callable[3,3]]', :block
end
def deprecation_gen(*args)
def deprecation_gen(*args, &block)
call_function('deprecation', 'merge', 'This function is deprecated, please use stdlib::merge instead.', false)
call_function('stdlib::merge', *args)
call_function('stdlib::merge', *args, &block)
end
end