Skip to content

Add value packing specs for more Enumerable and Enumerator::Lazy methods#1375

Open
sampokuokkanen wants to merge 1 commit into
ruby:masterfrom
sampokuokkanen:enumerable-value-packing-coverage
Open

Add value packing specs for more Enumerable and Enumerator::Lazy methods#1375
sampokuokkanen wants to merge 1 commit into
ruby:masterfrom
sampokuokkanen:enumerable-value-packing-coverage

Conversation

@sampokuokkanen
Copy link
Copy Markdown
Contributor

Reuse the :enumerable_value_packing shared examples from #1363 for drop, take_while, drop_while, select, reject and uniq, on both the eager Enumerable methods and their Enumerator::Lazy counterparts.

compact and Enumerator::Lazy#with_index get dedicated examples since their output shape differs from the shared examples: compact removes the nil that a zero-argument yield packs to, and with_index pairs the packed value with the index ([packed_value, index]).

Reuse the :enumerable_value_packing shared examples from ruby#1363 for
drop, take_while, drop_while, select, reject and uniq, on both the
eager Enumerable methods and their Enumerator::Lazy counterparts.

compact and Enumerator::Lazy#with_index get dedicated examples since
their output shape differs from the shared examples: compact removes
the nil that a zero-argument yield packs to, and with_index pairs the
packed value with the index ([packed_value, index]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant