Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements to Enumerator::Lazy#uniq and #chunk #2146

Merged
merged 2 commits into from
Nov 11, 2020

Conversation

LillianZ
Copy link
Contributor

@LillianZ LillianZ commented Nov 10, 2020

Code for Enumerator::Lazy#uniq seems correct to me, but to pass the rest of the specs I think some of rewind and to_a/force or something more fundamental needs a fix.

The pair of rewind and to_a/force behaves improperly on the outputs of take, drop, uniq, etc, but seemed okay on the output of map, and I couldn't determine the root cause.

Shopify#1

Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@eregon
Copy link
Member

eregon commented Nov 10, 2020

Maybe we need to reset the state (in this case, h = {}) on rewind and after to_a/force.
This seems a step in the right direction, thanks.

@eregon eregon added the in-ci The PR is being tested in CI. Do not push new commits. label Nov 10, 2020
graalvmbot pushed a commit that referenced this pull request Nov 11, 2020
@graalvmbot graalvmbot merged commit 0f6ee4b into oracle:master Nov 11, 2020
@LillianZ LillianZ deleted the EnumeratorLazy branch November 11, 2020 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-ci The PR is being tested in CI. Do not push new commits. oca-signed shopify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants