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 Range#step #10203

Merged
merged 1 commit into from
Jan 6, 2021
Merged

Conversation

straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented Jan 6, 2021

Similar to #10130 this fixes Range#step for some edge cases. Behaviour of Number#step and Range#step should have identical behaviour now (except for exclusive option). See #9339 (comment) for context.

Specs are simplified by a lot and now work combined for yielding and iterator overloads using it_iterates helper (see #10158) .

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:specs topic:stdlib:collection labels Jan 6, 2021
Copy link
Member

@asterite asterite left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

@asterite asterite added this to the 1.0.0 milestone Jan 6, 2021
@asterite asterite merged commit d5fd6db into crystal-lang:master Jan 6, 2021
@straight-shoota straight-shoota deleted the fix/range-step branch January 6, 2021 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:specs topic:stdlib:collection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants