8000 Do not loop forever when skip_lines regexp matches zero length with anchors by crazymykl · Pull Request #110 · ruby/csv · GitHub
[go: up one dir, main page]

Skip to content

Do not loop forever when skip_lines regexp matches zero length with anchors #110

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

Merged
merged 4 commits into from
Nov 3, 2019

Conversation

crazymykl
Copy link
Contributor
@crazymykl crazymykl commented Nov 1, 2019

This started failing in v3.0.2.

There is a minimal repro case in the test.

@crazymykl
Copy link
Contributor Author

Another approach that would work is to set skip_blanks if the skip_lines pattern matches an empty string during initialization; that would avoid changes in the hot loop.

@kou kou merged commit 3b15d4a into ruby:master Nov 3, 2019
@kou
Copy link
Member
kou commented Nov 3, 2019

Thanks.
I chose eos? in skip_needless_lines? because the same problem is happen by another skip_needless_lines? call with the original approach.

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

Successfully merging this pull request may close these issues.

2 participants
0