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

ruby-changes:26770

From: marcandre <ko1@a...>
Date: Tue, 15 Jan 2013 10:42:19 +0900 (JST)
Subject: [ruby-changes:26770] marcandRe: r38822 (trunk): * test_lazy_enumerator: Test that map & flat_map also require a block

marcandre	2013-01-15 10:40:29 +0900 (Tue, 15 Jan 2013)

  New Revision: 38822

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

  Log:
    * test_lazy_enumerator: Test that map & flat_map also require a block

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_lazy_enumerator.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38821)
+++ ChangeLog	(revision 38822)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jan 15 10:40:18 2013  Marc-Andre Lafortune  <ruby-core@m...>
+
+	* test_lazy_enumerator: Test that map & flat_map also require a block
+
 Tue Jan 15 09:22:47 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* thread_pthread.c (gvl_init): Reset gvl.wait_yield explicitly when
Index: test/ruby/test_lazy_enumerator.rb
===================================================================
--- test/ruby/test_lazy_enumerator.rb	(revision 38821)
+++ test/ruby/test_lazy_enumerator.rb	(revision 38822)
@@ -370,7 +370,7 @@ EOS https://github.com/ruby/ruby/blob/trunk/test/ruby/test_lazy_enumerator.rb#L370
   end
 
   def test_require_block
-    %i[select reject drop_while take_while].each do |method|
+    %i[select reject drop_while take_while map flat_map].each do |method|
       assert_raise(ArgumentError){ [].lazy.send(method) }
     end
   end

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

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