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

ruby-changes:32593

From: zzak <ko1@a...>
Date: Tue, 21 Jan 2014 16:45:59 +0900 (JST)
Subject: [ruby-changes:32593] zzak:r44672 (trunk): * enum.c: [DOC] Add simple example of Enumerable#zip [ci skip]

zzak	2014-01-21 16:45:55 +0900 (Tue, 21 Jan 2014)

  New Revision: 44672

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

  Log:
    * enum.c: [DOC] Add simple example of Enumerable#zip [ci skip]
      Patch by @nruth on documenting-ruby/ruby#22
      https://github.com/documenting-ruby/ruby/pull/22

  Modified files:
    trunk/ChangeLog
    trunk/enum.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44671)
+++ ChangeLog	(revision 44672)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jan 21 16:43:22 2014  Zachary Scott  <e@z...>
+
+	* enum.c: [DOC] Add simple example of Enumerable#zip [ci skip]
+	  Patch by @nruth on documenting-ruby/ruby#22
+	  https://github.com/documenting-ruby/ruby/pull/22
+
 Tue Jan 21 16:26:44 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* thread_pthread.c (rb_thread_create_timer_thread): expand timer
Index: enum.c
===================================================================
--- enum.c	(revision 44671)
+++ enum.c	(revision 44672)
@@ -2078,6 +2078,7 @@ zip_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, me https://github.com/ruby/ruby/blob/trunk/enum.c#L2078
  *     a = [ 4, 5, 6 ]
  *     b = [ 7, 8, 9 ]
  *
+ *     a.zip(b)                 #=> [[4, 7], [5, 8], [6, 9]]
  *     [1, 2, 3].zip(a, b)      #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
  *     [1, 2].zip(a, b)         #=> [[1, 4, 7], [2, 5, 8]]
  *     a.zip([1, 2], [8])       #=> [[4, 1, 8], [5, 2, nil], [6, nil, nil]]

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

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