aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorBrian Christian <brchristian@gmail.com>2016-02-10 10:10:38 -0800
committerBrian Christian <brchristian@gmail.com>2016-02-10 10:10:38 -0800
commite8aeda2ab39b5d416a72edfa74e0fb17721eb6f9 (patch)
treeea2b76a40f9d9ce3046a9fae3f177b9e4c0b1706 /activesupport/lib/active_support
parentc74045cf0771ab51dfeca94b30c447cab6193e60 (diff)
downloadrails-e8aeda2ab39b5d416a72edfa74e0fb17721eb6f9.tar.gz
rails-e8aeda2ab39b5d416a72edfa74e0fb17721eb6f9.tar.bz2
rails-e8aeda2ab39b5d416a72edfa74e0fb17721eb6f9.zip
rename to 'second_to_last' and 'third_to_last'
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/core_ext/array/access.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/access.rb b/activesupport/lib/active_support/core_ext/array/access.rb
index e413acddc5..37d833887a 100644
--- a/activesupport/lib/active_support/core_ext/array/access.rb
+++ b/activesupport/lib/active_support/core_ext/array/access.rb
@@ -76,15 +76,15 @@ class Array
# Equal to <tt>self[-3]</tt>.
#
- # %w( a b c d e ).antepenultimate # => "c"
- def antepenultimate
+ # %w( a b c d e ).third_to_last # => "c"
+ def third_to_last
self[-3]
end
# Equal to <tt>self[-2]</tt>.
#
- # %w( a b c d e ).penultimate # => "d"
- def penultimate
+ # %w( a b c d e ).second_to_last # => "d"
+ def second_to_last
self[-2]
end
end