diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_array.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 5d85927da7..fc55b86176 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -97,6 +97,17 @@ class TestArray < Test::Unit::TestCase x = [1,2,3] x.concat(x) assert_equal([1,2,3,1,2,3], x) + + x = [1,2,3] + x.clear + assert_equal([], x) + + x = [1,2,3] + y = x.dup + x << 4 + y << 5 + assert_equal([1,2,3,4], x) + assert_equal([1,2,3,5], y) end def test_beg_end |