aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/callbacks.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2011-04-12 00:23:07 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-12 00:23:07 +0200
commitd1575ae1b9658c91145d6a46ec2a144a5a089207 (patch)
treed630cd4ba2cd512c3be56e33d4e7b45e0cf8fff4 /activesupport/lib/active_support/callbacks.rb
parent5918b868b24ff384365d436367611aea577f3723 (diff)
downloadrails-d1575ae1b9658c91145d6a46ec2a144a5a089207.tar.gz
rails-d1575ae1b9658c91145d6a46ec2a144a5a089207.tar.bz2
rails-d1575ae1b9658c91145d6a46ec2a144a5a089207.zip
Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion!
Diffstat (limited to 'activesupport/lib/active_support/callbacks.rb')
-rw-r--r--activesupport/lib/active_support/callbacks.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index 738ce0e994..6a0bffb6d7 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -413,7 +413,7 @@ module ActiveSupport
# CallbackChain.
#
def __update_callbacks(name, filters = [], block = nil) #:nodoc:
- type = filters.first.either?(:before, :after, :around) ? filters.shift : :before
+ type = filters.first.among?(:before, :after, :around) ? filters.shift : :before
options = filters.last.is_a?(Hash) ? filters.pop : {}
filters.unshift(block) if block