mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
54a8318ecd
commit
a6cf2a9412
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Aug 11 10:51:19 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_array.rb: Add test for `Array#flatten` with level 1
|
||||
[fix GH-986] Patch @yui-knk
|
||||
|
||||
Tue Aug 11 10:48:16 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
|
||||
* enum.c: added doc for Enumerable#zip
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue