diff options
| author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-20 01:26:39 +0000 |
|---|---|---|
| committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-20 01:26:39 +0000 |
| commit | a270dd1f8b1a17a374b76ab019847b08302cbce9 (patch) | |
| tree | 500e00eb62377cc922bf3b46e513dcb4345b5c5e /test/ruby/test_array.rb | |
| parent | d120594dd52e65931c461399b5eccf30115dc384 (diff) | |
| download | ruby-a270dd1f8b1a17a374b76ab019847b08302cbce9.tar.gz ruby-a270dd1f8b1a17a374b76ab019847b08302cbce9.tar.xz ruby-a270dd1f8b1a17a374b76ab019847b08302cbce9.zip | |
* test/ruby/test_array.rb (test_misc): added some tests
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_array.rb')
| -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 6e70dc56f..c56f06c3b 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_find_all |
