diff options
author | fatkodima <fatkodima@rambler.ru> | 2017-06-27 21:34:28 +0300 |
---|---|---|
committer | fatkodima <fatkodima@rambler.ru> | 2017-06-27 21:34:28 +0300 |
commit | 2768cd1d746f448f00e0aa4f955e1afdabb2e902 (patch) | |
tree | 05f30051f7da318fab953993f3139c9c57a7af9c | |
parent | faa225fd029180cb06287be36fad6c742e8e8261 (diff) | |
download | rails-2768cd1d746f448f00e0aa4f955e1afdabb2e902.tar.gz rails-2768cd1d746f448f00e0aa4f955e1afdabb2e902.tar.bz2 rails-2768cd1d746f448f00e0aa4f955e1afdabb2e902.zip |
Remove useless class checking for `ActiveSupport::Callbacks`s result_lambda
-rw-r--r-- | actionpack/lib/abstract_controller/callbacks.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index ba7dec6083..e4400e8704 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -29,7 +29,7 @@ module AbstractController included do define_callbacks :process_action, - terminator: ->(controller, result_lambda) { result_lambda.call if result_lambda.is_a?(Proc); controller.performed? }, + terminator: ->(controller, result_lambda) { result_lambda.call; controller.performed? }, skip_after_callbacks_if_terminated: true end diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index ddfa91a342..101d05fddd 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -596,7 +596,7 @@ module ActiveSupport Proc.new do |target, result_lambda| terminate = true catch(:abort) do - result_lambda.call if result_lambda.is_a?(Proc) + result_lambda.call terminate = false end terminate |