Reduce Array assignment by not giving a name for unused `*args`

This commit is contained in:
Akira Matsuda 2019-07-31 17:26:43 +09:00
parent 7e299ce230
commit 5ae814d016
4 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ module AbstractController
# Override <tt>AbstractController::Base#process_action</tt> to run the
# <tt>process_action</tt> callbacks around the normal behavior.
def process_action(*args)
def process_action(*)
run_callbacks(:process_action) do
super
end

View File

@ -16,7 +16,7 @@ module ActionController
attr_internal :view_runtime
def process_action(*args)
def process_action(*)
raw_payload = {
controller: self.class.name,
action: action_name,
@ -38,7 +38,7 @@ module ActionController
end
end
def render(*args)
def render(*)
render_output = nil
self.view_runtime = cleanup_view_runtime do
Benchmark.ms { render_output = super }
@ -59,7 +59,7 @@ module ActionController
end
end
def redirect_to(*args)
def redirect_to(*)
ActiveSupport::Notifications.instrument("redirect_to.action_controller") do |payload|
result = super
payload[:status] = response.status

View File

@ -240,7 +240,7 @@ module ActionController
# Performs parameters wrapping upon the request. Called automatically
# by the metal call stack.
def process_action(*args)
def process_action(*)
_perform_parameter_wrapping if _wrapper_enabled?
super
end

View File

@ -18,7 +18,7 @@ module ActionController #:nodoc:
end
private
def process_action(*args)
def process_action(*)
super
rescue Exception => exception
request.env["action_dispatch.show_detailed_exceptions"] ||= show_detailed_exceptions?