diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-11 01:51:24 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-11 01:51:24 +0000 |
commit | 70ce739c27b0c16fa5b1ea106c93cb8817eaf6ec (patch) | |
tree | 6c3ad6f7fcdcb214c866c47ab9e0ca9f542bb190 /test/ruby/test_array.rb | |
parent | f330b7bd8751ccf87ea05309abd4b6ca1713b31e (diff) | |
download | ruby-70ce739c27b0c16fa5b1ea106c93cb8817eaf6ec.tar.gz |
* test/ruby/test_array.rb: Add test for `Array#flatten` with level 1
[fix GH-986] Patch @yui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r-- | test/ruby/test_array.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 42476ace24..977c14cfa0 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -767,6 +767,7 @@ class TestArray < Test::Unit::TestCase a5 = @cls[ a1, @cls[], a3 ] assert_equal(@cls[1, 2, 3, 4, 5, 6], a5.flatten) + assert_equal(@cls[1, 2, 3, 4, [5, 6]], a5.flatten(1)) assert_equal(@cls[], @cls[].flatten) assert_equal(@cls[], @cls[@cls[@cls[@cls[],@cls[]],@cls[@cls[]],@cls[]],@cls[@cls[@cls[]]]].flatten) |