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

Batch returns non-empty batch sequence for empty input collection #741

Closed
AndrewKostousov opened this issue Dec 26, 2019 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@AndrewKostousov
Copy link

The following test is failing with MoreLinq v3.3.1 and was passing with MoreLinq v3.2.0:

new string[0].Batch(100).ToArray().Should().BeEmpty();

I think this is side-effect of #623 optimization. If this change in behavior was intentional it would be nice if it had been documented somewhere.

@atifaziz
Copy link
Member

@AndrewKostousov That is certainly a bug that seems to have slipped through the cracks and thanks for reporting it!

@atifaziz atifaziz added the bug label Dec 27, 2019
@atifaziz atifaziz self-assigned this Dec 27, 2019
@atifaziz atifaziz changed the title Batch() returns non-empty batch sequence for empty input collection Batch returns non-empty batch sequence for empty input collection Dec 27, 2019
@atifaziz atifaziz added this to the 3.3.2 milestone Dec 27, 2019
atifaziz added a commit to atifaziz/MoreLINQ that referenced this issue Dec 27, 2019
@atifaziz
Copy link
Member

The fix for this is now published as part of version 3.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants