From a44e1e86b4970810ecc51c41e47f9bc21f55730c Mon Sep 17 00:00:00 2001 From: knu Date: Wed, 28 May 2008 09:12:28 +0000 Subject: * array.c (rb_ary_nitems, Init_Array): Axe Array#nitems(). cf. [ruby-dev:34676]-[ruby-dev:34713] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_array.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'test/ruby/test_array.rb') diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 5618d1545..035b70ad2 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -827,14 +827,6 @@ class TestArray < Test::Unit::TestCase assert_equal(@cls[], a) end - def test_nitems - assert_equal(0, @cls[].nitems) - assert_equal(1, @cls[1].nitems) - assert_equal(1, @cls[1, nil].nitems) - assert_equal(1, @cls[nil, 1].nitems) - assert_equal(3, @cls[1, nil, nil, 2, nil, 3, nil].nitems) - end - def test_pack a = @cls[*%w( cat wombat x yy)] assert_equal("catwomx yy ", a.pack("A3A3A3A3")) @@ -1513,10 +1505,6 @@ class TestArray < Test::Unit::TestCase assert_equal(a.hash, b.hash) end - def test_nitems2 - assert_equal(3, [5,6,7,8,9].nitems { |x| x % 2 != 0 }) - end - def test_flatten2 a = [] a << a -- cgit