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

Prefer String#each_line in Net::FTP#features #28

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

Maumagnaguagno
Copy link
Contributor

String#split without a block creates an intermediate array and requires a call to Array#each to iterate.
Replace String#split("\n").each with String#each_line, which is more efficient and readable.

Replace ``String#split("\n").each`` with ``String#each_line``.
@shugo shugo merged commit a711ae5 into ruby:master Jun 1, 2024
10 checks passed
@shugo
Copy link
Member

shugo commented Jun 1, 2024

It looks good. Thank you!

@Maumagnaguagno Maumagnaguagno deleted the each_line_in_features branch June 1, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants