Fix call-seq of lazy.filter_map [ci skip]
This commit is contained in:
parent
0174285e8c
commit
887163beb8
@ -2038,12 +2038,11 @@ lazy_filter_map_proc(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* enum.filter_map { |obj| block } -> an_enumerator
|
* lazy.filter_map { |obj| block } -> lazy_enumerator
|
||||||
* enum.filter_map -> an_enumerator
|
|
||||||
*
|
*
|
||||||
* Returns an enumerator which will return a new array containing the
|
* Returns an enumerator which will return a new array containing the
|
||||||
* truthy results (everything except +false+ or +nil+) of running the
|
* truthy results (everything except +false+ or +nil+) of running the
|
||||||
* +block+ for every element in +enum+.
|
* +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? }.take(5) #=> [4, 8, 12, 16, 20]
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user