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

Fixes underlying logic of slice_when / chunk_while to handle 1 element collections #5276

Merged
merged 1 commit into from Sep 19, 2018

Conversation

@mejackreed
Copy link
Contributor

@mejackreed mejackreed commented Aug 7, 2018

Enumerables with 1 element

Fixes #5275. Instead of checking for size 1 at the beginning, this change sets a
flag that never gets modified if each_cons(2) does not get called.
This happens in the case of 1 element Enumerables. The previous
behavior was fine for Enumerables that respond to size but fails
otherwise.

Enumerables with 1 element

Fixes #5275. Instead of checking for size 1 at the beginning, this change sets a
flag that never gets modified if `each_cons(2)` does not get called.
This happens in the case of 1 element Enumerables. The previous
behavior was fine for Enumerables that respond to `size` but fails
otherwise.
@mejackreed mejackreed changed the title Modifies underlying logic of slice_when / chunk_while to handle Fixes underlying logic of slice_when / chunk_while to handle 1 element collections Aug 7, 2018
@enebo enebo added this to the JRuby 9.2.1.0 milestone Sep 19, 2018
@enebo enebo merged commit 5e57d43 into jruby:master Sep 19, 2018
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
@enebo
Copy link
Member

@enebo enebo commented Sep 19, 2018

@mejackreed sorry we did not merge this a lot sooner.

@mejackreed
Copy link
Contributor Author

@mejackreed mejackreed commented Sep 19, 2018

No problem. Thanks for accepting the PR!

@mejackreed mejackreed deleted the mejackreed:fix-slice_when branch Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants