summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-21 07:45:55 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-21 07:45:55 +0000
commitf72e5b8bd39ac081272a2e956de0cf53a8a2eb67 (patch)
tree4e1f8bafe3cb93d6c7fb8af9494058bd45daf709 /enum.c
parentad9d4f021129d9ca7270d72370b83a9a5ffec9a0 (diff)
* 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c1
1 files changed, 1 insertions, 0 deletions
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]]