summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--enum.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4913635e1a..e4c682f5a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jan 21 16:43:22 2014 Zachary Scott <e@zzak.io>
+
+ * 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@ruby-lang.org>
* thread_pthread.c (rb_thread_create_timer_thread): expand timer
diff --git a/enum.c b/enum.c
index e37ff16c5d..044e48bdd0 100644
--- a/enum.c
+++ b/enum.c
@@ -2078,6 +2078,7 @@ zip_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memoval))
* 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]]