-
Notifications
You must be signed in to change notification settings - Fork 420
Fix SkipUntil to not call MoveNext past end of sequence #666
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
Conversation
Avoid calls to MoveNext after enumerator end.
atifaziz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this related to #649? It doesn't seem to have anything with SkipUntil forgetting to dispose the enumerator. Could you please explain what's the real issue being fixed here?
It is not, sorry I copy paste to quickly. I updated the first comment.. It's a re-called MoveNext on sequence end issue. |
So this is the fix for issue #664? |
Indeed, I forgot to mention it 😕 |
atifaziz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TestSkipUntilOnKnownInput test doesn't exercise the bug that this PR proposes to fix. If I just revert the fix in 1abdb31 then all tests still pass. Can you please add a covering test first?
Thanks.
- empty sequence for input - one-item sequence, predicate succeed - one-item sequence, predicate don't succeed - predicate succeed on first item - predicate succeed on last item - predicate never succeed
atifaziz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are just minor cosmetic & polishing touches needed and then we're good to merge this.
Thanks!
* Update SkipUntil.cs: Formatting * Update SkipUntilTest.cs: Test readability
Orace
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will not compile without this.
Coding may be hard
|
A squash merge may reduce my shame |
atifaziz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix! All looks good! ![]()
Fix a part of #649Fork of #660
SkipUntil called MoveNext after sequence end