aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-23 15:05:28 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-23 15:05:28 -0300
commita31277011814b7bdb6be41a807e14d6bf2852620 (patch)
tree3a93279c7d1b2cc2b9568a9cdb960d294eef5c66 /activesupport/test
parentcb7f03f061264ae1d4626369bf7f1264d0914a2b (diff)
parent0e9401733c55e3ca43e48ad2b9b60520ef57387f (diff)
downloadrails-a31277011814b7bdb6be41a807e14d6bf2852620.tar.gz
rails-a31277011814b7bdb6be41a807e14d6bf2852620.tar.bz2
rails-a31277011814b7bdb6be41a807e14d6bf2852620.zip
Merge pull request #15276 from kuldeepaggarwal/fix-array-to
Array#to now accept negative position also.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/array_ext_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb
index 4601a80d42..bd1b818717 100644
--- a/activesupport/test/core_ext/array_ext_test.rb
+++ b/activesupport/test/core_ext/array_ext_test.rb
@@ -18,6 +18,8 @@ class ArrayExtAccessTests < ActiveSupport::TestCase
assert_equal %w( a ), %w( a b c d ).to(0)
assert_equal %w( a b c ), %w( a b c d ).to(2)
assert_equal %w( a b c d ), %w( a b c d ).to(10)
+ assert_equal %w( a b c ), %w( a b c d ).to(-2)
+ assert_equal %w(), %w( a b c ).to(-10)
end
def test_second_through_tenth