mirror of https://github.com/rails/rails
All intermediate delegation methods should preserve kwargs flag
Since 0456826180
,
`foo(*caller_args)` method call delegation no longer preserve kwargs
flag.
Fixes #44846.
This commit is contained in:
parent
22ca875f9c
commit
714fd07fd9
|
@ -624,6 +624,7 @@ module ActionMailer
|
|||
@_message = NullMail.new unless @_mail_was_called
|
||||
end
|
||||
end
|
||||
ruby2_keywords(:process)
|
||||
|
||||
class NullMail # :nodoc:
|
||||
def body; "" end
|
||||
|
|
|
@ -20,7 +20,7 @@ module ActionMailer # :nodoc:
|
|||
end
|
||||
|
||||
private
|
||||
def process(*)
|
||||
def process(...)
|
||||
handle_exceptions do
|
||||
super
|
||||
end
|
||||
|
|
|
@ -155,6 +155,7 @@ module AbstractController
|
|||
|
||||
process_action(action_name, *args)
|
||||
end
|
||||
ruby2_keywords(:process)
|
||||
|
||||
# Delegates to the class's ::controller_path.
|
||||
def controller_path
|
||||
|
@ -215,8 +216,8 @@ module AbstractController
|
|||
#
|
||||
# Notice that the first argument is the method to be dispatched
|
||||
# which is *not* necessarily the same as the action name.
|
||||
def process_action(method_name, *args)
|
||||
send_action(method_name, *args)
|
||||
def process_action(...)
|
||||
send_action(...)
|
||||
end
|
||||
|
||||
# Actually call the method associated with the action. Override
|
||||
|
|
|
@ -244,7 +244,7 @@ module AbstractController
|
|||
private
|
||||
# Override <tt>AbstractController::Base#process_action</tt> to run the
|
||||
# <tt>process_action</tt> callbacks around the normal behavior.
|
||||
def process_action(*)
|
||||
def process_action(...)
|
||||
run_callbacks(:process_action) do
|
||||
super
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module ActionView
|
|||
end
|
||||
|
||||
# Override process to set up I18n proxy.
|
||||
def process(*) # :nodoc:
|
||||
def process(...) # :nodoc:
|
||||
old_config, I18n.config = I18n.config, I18nProxy.new(I18n.config, lookup_context)
|
||||
super
|
||||
ensure
|
||||
|
|
|
@ -471,6 +471,7 @@ module ActiveModel
|
|||
def attribute_missing(match, *args, &block)
|
||||
__send__(match.proxy_target, match.attr_name, *args, &block)
|
||||
end
|
||||
ruby2_keywords(:attribute_missing)
|
||||
|
||||
# A +Person+ instance with a +name+ attribute can ask
|
||||
# <tt>person.respond_to?(:name)</tt>, <tt>person.respond_to?(:name=)</tt>,
|
||||
|
|
|
@ -429,10 +429,10 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
def _exec_scope(*args, &block) # :nodoc:
|
||||
def _exec_scope(...) # :nodoc:
|
||||
@delegate_to_klass = true
|
||||
registry = klass.scope_registry
|
||||
_scoping(nil, registry) { instance_exec(*args, &block) || self }
|
||||
_scoping(nil, registry) { instance_exec(...) || self }
|
||||
ensure
|
||||
@delegate_to_klass = false
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue