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

Fix calling enumerator methods such as with_index on Enumerator::Chain #3811

Merged

Conversation

jeremyevans
Copy link
Contributor

This previously raised a TypeError. Wrap the Enumerator::Chain in
an Enumerator to work around the problem.

Fixes [Bug #17216]

@marcandre
Copy link
Member

@jeremyevans patch looks good.

Maybe just missing a test to insure the lazy case works well and that it solves #17347

Anything else holding it up?

@jeremyevans
Copy link
Contributor Author

Nothing holding it up as far as I know. I'm not sure I'll be able to work more on this before the release of 3.0, but feel free to merge and add a test for the lazy case before release if you want.

This previously raised a TypeError.  Wrap the Enumerator::Chain in
an Enumerator to work around the problem.

Fixes [Bug #17216]
Previously these methods were defined but raised TypeError, which
seems worse.
@jeremyevans jeremyevans force-pushed the fix-enum-chain-enum-methods-17216 branch from b7754c5 to 001e98d Compare March 5, 2021 20:49
@marcandre
Copy link
Member

👍

@jeremyevans jeremyevans merged commit 68d0285 into ruby:master Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants