ruby-changes:56178
From: Nobuyoshi <ko1@a...>
Date: Fri, 21 Jun 2019 17:40:46 +0900 (JST)
Subject: [ruby-changes:56178] Nobuyoshi Nakada: 35392ff0a0 (trunk): Fix an example [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=35392ff0a0 From 35392ff0a00934ec02558305b7be8dffe6420d30 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 21 Jun 2019 17:40:28 +0900 Subject: Fix an example [ci skip] diff --git a/enumerator.c b/enumerator.c index 21a7389..c37c8af 100644 --- a/enumerator.c +++ b/enumerator.c @@ -2044,7 +2044,7 @@ lazy_filter_map_proc(RB_BLOCK_CALL_FUNC_ARGLIST(val, m)) https://github.com/ruby/ruby/blob/trunk/enumerator.c#L2044 * truthy results (everything except +false+ or +nil+) of running the * +block+ for every element in +lazy+. * - * (1..).lazy.filter_map { |i| i * 2 if i.even? }.take(5) #=> [4, 8, 12, 16, 20] + * (1..).lazy.filter_map { |i| i * 2 if i.even? }.first(5) #=> [4, 8, 12, 16, 20] * */ static VALUE -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/