summaryrefslogtreecommitdiff
path: root/tool/update-bundled_gems.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-08-12 23:51:55 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-08-12 23:51:55 +0900
commite44445596fb8ba70a2a9fc602458bfe10d493146 (patch)
treef1f53fb7d59c82ab65ee8d17afdc0b4fba142feb /tool/update-bundled_gems.rb
parentb1799267bf39bbca58a160c00c1581a694ca6ad9 (diff)
downloadruby-e44445596fb8ba70a2a9fc602458bfe10d493146.tar.gz
Preserve each column positions in gems/bundled_gems
Diffstat (limited to 'tool/update-bundled_gems.rb')
-rwxr-xr-xtool/update-bundled_gems.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/update-bundled_gems.rb b/tool/update-bundled_gems.rb
index 5b9c6b6974..bed1cfc52b 100755
--- a/tool/update-bundled_gems.rb
+++ b/tool/update-bundled_gems.rb
@@ -16,5 +16,7 @@ unless /^[^#]/ !~ (gem = $F[0])
$F[3..-1] = []
end
end
- $_ = [gem.name, gem.version, uri, *$F[3..-1]].join(" ")
+ f = [gem.name, gem.version.to_s, uri, *$F[3..-1]]
+ $_.gsub!(/\S+\s*/) {|s| f.shift.ljust(s.size)}
+ $_ = [$_, *f].join(" ") unless f.empty?
end