diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2016-10-21 08:17:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-21 08:17:21 -0700 |
commit | 0a3595f64d772e0b0babd4c50535e7299c754724 (patch) | |
tree | d1b17923e66c36975c90608465d322f10c6536a4 | |
parent | a08ef99d5f74301e027feb727c680b3a1fda44b2 (diff) | |
parent | 5f382d41c30b1e433d777a8daaedb247d7f2a57c (diff) | |
download | rails-0a3595f64d772e0b0babd4c50535e7299c754724.tar.gz rails-0a3595f64d772e0b0babd4c50535e7299c754724.tar.bz2 rails-0a3595f64d772e0b0babd4c50535e7299c754724.zip |
Merge pull request #26854 from headius/explicit_order_callback_args
Explicitly unpack the expanded args to avoid execution order diff.
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 890b1cd73b..9b9c9cbbdd 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -410,8 +410,8 @@ module ActiveSupport # values. def make_lambda lambda do |target, value, &block| - c = expand(target, value, block) - c.shift.send(*c, &c.shift) + target, block, method, *arguments = expand(target, value, block) + target.send(method, *arguments, &block) end end @@ -419,8 +419,8 @@ module ActiveSupport # values, but then return the boolean inverse of that result. def inverted_lambda lambda do |target, value, &block| - c = expand(target, value, block) - ! c.shift.send(*c, &c.shift) + target, block, method, *arguments = expand(target, value, block) + ! target.send(method, *arguments, &block) end end |