diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-21 16:08:40 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-21 16:08:40 +0000 |
commit | 45c2671e370a67686e0a64a7364baa00b628cceb (patch) | |
tree | 3b9d1091d12319feee6f67639786b5186d6b0bd2 /test/ruby/test_primitive.rb | |
parent | c758a9069377ed672d5e82a29e5c0555818d9928 (diff) | |
download | ruby-45c2671e370a67686e0a64a7364baa00b628cceb.tar.gz |
* test/ruby/test_bignum.rb, test/ruby/test_class.rb,
test/ruby/test_defined.rb, test/ruby/test_hash.rb,
test/ruby/test_primitive.rb, test/ruby/test_variable.rb: add some
tests (for coverage).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_primitive.rb')
-rw-r--r-- | test/ruby/test_primitive.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_primitive.rb b/test/ruby/test_primitive.rb index 46133eff8c..d701348f26 100644 --- a/test/ruby/test_primitive.rb +++ b/test/ruby/test_primitive.rb @@ -228,6 +228,12 @@ class TestRubyPrimitive < Test::Unit::TestCase assert_equal 7, a[0] a[0] ||= 3 assert_equal 7, a[0] + + a = [0, 1, nil, 3, 4] + a[*[2]] ||= :foo + assert_equal [0, 1, :foo, 3, 4], a + a[*[1,3]] &&= [:bar] + assert_equal [0, :bar, 4], a end def test_opassign_and_or |