[前][次][番号順一覧][スレッド一覧]

ruby-changes:72922

From: Nobuyoshi <ko1@a...>
Date: Fri, 12 Aug 2022 23:54:04 +0900 (JST)
Subject: [ruby-changes:72922] e44445596f (master): Preserve each column positions in gems/bundled_gems

https://git.ruby-lang.org/ruby.git/commit/?id=e44445596f

From e44445596fb8ba70a2a9fc602458bfe10d493146 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 12 Aug 2022 23:51:55 +0900
Subject: Preserve each column positions in gems/bundled_gems

---
 tool/update-bundled_gems.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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]) https://github.com/ruby/ruby/blob/trunk/tool/update-bundled_gems.rb#L16
       $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
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]