From f72e5b8bd39ac081272a2e956de0cf53a8a2eb67 Mon Sep 17 00:00:00 2001 From: zzak Date: Tue, 21 Jan 2014 07:45:55 +0000 Subject: [PATCH] * 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 --- ChangeLog | 6 ++++++ enum.c | 1 + 2 files changed, 7 insertions(+) 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 + + * 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 * 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]]