summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 01:51:24 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 01:51:24 +0000
commita6cf2a94124ccd99f01f02d50c397a5285965187 (patch)
tree6c3ad6f7fcdcb214c866c47ab9e0ca9f542bb190 /test/ruby/test_array.rb
parent54a8318ecd1fe160d7061bf5b59d7708148dceee (diff)
* 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.rb1
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)