mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 22:14:37 +02:00
Adding Enumerable#filter_map
[Feature #15323] Closes: https://github.com/ruby/ruby/pull/2017
This commit is contained in:
parent
1ccc2eeba0
commit
0acbdd1ed0
4 changed files with 78 additions and 1 deletions
|
@ -542,7 +542,7 @@ class TestEnumerator < Test::Unit::TestCase
|
|||
|
||||
def test_size_for_enum_created_from_enumerable
|
||||
%i[find_all reject map flat_map partition group_by sort_by min_by max_by
|
||||
minmax_by each_with_index reverse_each each_entry].each do |method|
|
||||
minmax_by each_with_index reverse_each each_entry filter_map].each do |method|
|
||||
assert_equal nil, @obj.send(method).size
|
||||
assert_equal 42, @sized.send(method).size
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue