aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/callbacks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/callbacks.rb')
-rw-r--r--activesupport/lib/active_support/callbacks.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index 890b1cd73b..af8ddb176f 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -117,8 +117,8 @@ module ActiveSupport
(skipped ||= []) << current
next
else
- expanded = current.expand_call_template(env, invoke_sequence)
- expanded.shift.send(*expanded, &expanded.shift)
+ target, block, method, *arguments = current.expand_call_template(env, invoke_sequence)
+ target.send(method, *arguments, &block)
end
current.invoke_after(env)
skipped.pop.invoke_after(env) while skipped && skipped.first
@@ -293,7 +293,7 @@ module ActiveSupport
attr_reader :chain_config
def initialize(name, filter, kind, options, chain_config)
- @chain_config = chain_config
+ @chain_config = chain_config
@name = name
@kind = kind
@filter = filter
@@ -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