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 /activesupport/test/core_ext | |
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 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/array/access_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/array/access_test.rb b/activesupport/test/core_ext/array/access_test.rb index 3f1e0c4cb4..1d834667f0 100644 --- a/activesupport/test/core_ext/array/access_test.rb +++ b/activesupport/test/core_ext/array/access_test.rb @@ -26,6 +26,8 @@ class AccessTest < ActiveSupport::TestCase assert_equal array[3], array.fourth assert_equal array[4], array.fifth assert_equal array[41], array.forty_two + assert_equal array[-3], array.third_to_last + assert_equal array[-2], array.second_to_last end def test_without |