From 45c2671e370a67686e0a64a7364baa00b628cceb Mon Sep 17 00:00:00 2001 From: mame Date: Thu, 21 Jan 2010 16:08:40 +0000 Subject: * 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 --- test/ruby/test_primitive.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby/test_primitive.rb') 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 -- cgit v1.2.3