Skip to content

Make String#each_line work correctly with paragraph separator and chomp#5960

Merged
jeremyevans merged 1 commit into
ruby:masterfrom
jeremyevans:string-each_line-paragraph-chomp-18768
Jul 21, 2022
Merged

Make String#each_line work correctly with paragraph separator and chomp#5960
jeremyevans merged 1 commit into
ruby:masterfrom
jeremyevans:string-each_line-paragraph-chomp-18768

Conversation

@jeremyevans

Copy link
Copy Markdown
Contributor

Previously, it was including one newline when chomp was used,
which is inconsistent with IO#each_line behavior. This makes
behavior consistent with IO#each_line, chomping all paragraph
separators (multiple consecutive newlines), but not single
newlines.

Partially Fixes [Bug #18768]

Previously, it was including one newline when chomp was used,
which is inconsistent with IO#each_line behavior. This makes
behavior consistent with IO#each_line, chomping all paragraph
separators (multiple consecutive newlines), but not single
newlines.

Partially Fixes [Bug #18768]
@jeremyevans jeremyevans requested a review from shyouhei May 26, 2022 22:04
@shyouhei shyouhei requested a review from nurse May 27, 2022 09:46
@jeremyevans jeremyevans merged commit 423b41c into ruby:master Jul 21, 2022
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.

1 participant