[前][次][番号順一覧][スレッド一覧]

ruby-changes:39446

From: hsbt <ko1@a...>
Date: Tue, 11 Aug 2015 10:51:28 +0900 (JST)
Subject: [ruby-changes:39446] hsbt:r51527 (trunk): * test/ruby/test_array.rb: Add test for `Array#flatten` with level 1

hsbt	2015-08-11 10:51:24 +0900 (Tue, 11 Aug 2015)

  New Revision: 51527

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51527

  Log:
    * test/ruby/test_array.rb: Add test for `Array#flatten` with level 1
      [fix GH-986] Patch @yui-knk

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_array.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51526)
+++ ChangeLog	(revision 51527)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Aug 11 10:51:19 2015  SHIBATA Hiroshi  <hsbt@r...>
+
+	* 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@r...>
 
 	* enum.c: added doc for Enumerable#zip
Index: test/ruby/test_array.rb
===================================================================
--- test/ruby/test_array.rb	(revision 51526)
+++ test/ruby/test_array.rb	(revision 51527)
@@ -767,6 +767,7 @@ class TestArray < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_array.rb#L767
 
     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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]