aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorBrian Christian <brchristian@gmail.com>2016-02-09 16:02:08 -0800
committerBrian Christian <brchristian@gmail.com>2016-02-09 16:02:08 -0800
commitc74045cf0771ab51dfeca94b30c447cab6193e60 (patch)
tree277b16c5e586866a7284b63ac753035a7f81dd3e /guides
parentb5eb2423b6e431ba53e3836d58449e7e810096b4 (diff)
downloadrails-c74045cf0771ab51dfeca94b30c447cab6193e60.tar.gz
rails-c74045cf0771ab51dfeca94b30c447cab6193e60.tar.bz2
rails-c74045cf0771ab51dfeca94b30c447cab6193e60.zip
allow Array.penultimate and Array.antepenultiate access methods
Diffstat (limited to 'guides')
-rw-r--r--guides/source/active_support_core_extensions.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 0aca6db9b6..91cf48a680 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -2240,7 +2240,7 @@ Similarly, `from` returns the tail from the element at the passed index to the e
[].from(0) # => []
```
-The methods `second`, `third`, `fourth`, and `fifth` return the corresponding element (`first` is built-in). Thanks to social wisdom and positive constructiveness all around, `forty_two` is also available.
+The methods `second`, `third`, `fourth`, and `fifth` return the corresponding element (`first` is built-in), while `penultimate` and `antepenultimate` return the second-to-last and third-to-last elements, respectively. Thanks to social wisdom and positive constructiveness all around, `forty_two` is also available.
```ruby
%w(a b c d).third # => "c"