diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_array.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 78e497d345..59e1ad463c 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1576,6 +1576,8 @@ class TestArray < Test::Unit::TestCase assert_nil(a.slice(10, -3)) assert_equal @cls[], a.slice(10..7) + + assert_equal([100], a.slice(-1, 1_000_000_000)) end def test_slice! @@ -1635,6 +1637,8 @@ class TestArray < Test::Unit::TestCase assert_nil(a.clone.slice!(10, -3)) assert_equal @cls[], a.clone.slice!(10..7) + + assert_equal([100], a.clone.slice!(-1, 1_000_000_000)) end def test_sort |