aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorErik Michaels-Ober <sferik@gmail.com>2014-10-13 11:47:16 +0100
committerErik Michaels-Ober <sferik@gmail.com>2014-10-13 11:47:16 +0100
commit8bb33e920a8627d38d52c1faa6dfd620d6799582 (patch)
tree1aac3dee92766b5eb8d7281e7e5956eac16c3eee /activesupport
parent996aab576eefb351025ae1d56371f41a0eb074c5 (diff)
downloadrails-8bb33e920a8627d38d52c1faa6dfd620d6799582.tar.gz
rails-8bb33e920a8627d38d52c1faa6dfd620d6799582.tar.bz2
rails-8bb33e920a8627d38d52c1faa6dfd620d6799582.zip
Replace Enumerable#reverse.each with Enumerable#reverse_each
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/callbacks.rb2
-rw-r--r--activesupport/test/inflector_test.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index 4bc13f20ca..45231bc101 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -559,7 +559,7 @@ module ActiveSupport
# This is used internally to append, prepend and skip callbacks to the
# CallbackChain.
def __update_callbacks(name) #:nodoc:
- ([self] + ActiveSupport::DescendantsTracker.descendants(self)).reverse.each do |target|
+ ([self] + ActiveSupport::DescendantsTracker.descendants(self)).reverse_each do |target|
chain = target.get_callbacks name
yield target, chain.dup
end
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index 5446c5ec3c..be68bb2e2e 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -490,8 +490,8 @@ class InflectorTest < ActiveSupport::TestCase
assert_equal [], inflect.uncountables
# restore all the inflections
- singulars.reverse.each { |singular| inflect.singular(*singular) }
- plurals.reverse.each { |plural| inflect.plural(*plural) }
+ singulars.reverse_each { |singular| inflect.singular(*singular) }
+ plurals.reverse_each { |plural| inflect.plural(*plural) }
inflect.uncountable(uncountables)
assert_equal singulars, inflect.singulars