aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
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 /activesupport/test/core_ext
parentb5eb2423b6e431ba53e3836d58449e7e810096b4 (diff)
downloadrails-c74045cf0771ab51dfeca94b30c447cab6193e60.tar.gz
rails-c74045cf0771ab51dfeca94b30c447cab6193e60.tar.bz2
rails-c74045cf0771ab51dfeca94b30c447cab6193e60.zip
allow Array.penultimate and Array.antepenultiate access methods
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/array/access_test.rb2
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..d7a3fb56c2 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.antepenultimate
+ assert_equal array[-2], array.penultimate
end
def test_without