diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2016-02-10 20:45:12 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2016-02-10 20:45:12 +0100 |
commit | 074ff5ce147bdbc988b54dbc5fb60f6eae9506a9 (patch) | |
tree | 366baa1109a11d71f8ab7f1f34a5daa5e575d070 /guides/source | |
parent | 688996da7b25080a1a2ef74f5b4789f3e5eb670d (diff) | |
parent | eaa1efe7d0b4e0f5682453b1ddfa186a292ddc86 (diff) | |
download | rails-074ff5ce147bdbc988b54dbc5fb60f6eae9506a9.tar.gz rails-074ff5ce147bdbc988b54dbc5fb60f6eae9506a9.tar.bz2 rails-074ff5ce147bdbc988b54dbc5fb60f6eae9506a9.zip |
Merge pull request #23583 from brchristian/penultimate
Array.second_to_last and Array.third_to_last access methods
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_support_core_extensions.md | 2 |
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..10122629b2 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, as do `second_to_last` and `third_to_last` (`first` and `last` are built-in). Thanks to social wisdom and positive constructiveness all around, `forty_two` is also available. ```ruby %w(a b c d).third # => "c" |