diff options
author | Mau Magnaguagno <[email protected]> | 2023-11-21 00:52:54 -0300 |
---|---|---|
committer | git <[email protected]> | 2023-11-24 07:26:26 +0000 |
commit | f792b55b2138c75bfc4efe1d15af5e924f4349bc () | |
tree | 81a52ce9715ab82be7f4523c7548f93e9bff2545 /lib/rubygems/command.rb | |
parent | 12f4e9655e6278b14f3b75ccccf63a535d72c120 (diff) |
[rubygems/rubygems] Prefer String#each_line in Gem::Command
Replace ``String#split("\n").each`` with ``String#each_line``. https://.com/rubygems/rubygems/commit/958744807d
-rw-r--r-- | lib/rubygems/command.rb | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -489,7 +489,7 @@ class Gem::Command @parser.separator nil @parser.separator " Description:" - formatted.split("\n").each do |line| @parser.separator " #{line.rstrip}" end end @@ -516,8 +516,8 @@ class Gem::Command @parser.separator nil @parser.separator " #{title}:" - content.split(/\n/).each do |line| - @parser.separator " #{line}" end end @@ -526,7 +526,7 @@ class Gem::Command @parser.separator nil @parser.separator " Summary:" - wrap(@summary, 80 - 4).split("\n").each do |line| @parser.separator " #{line.strip}" end end |