1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix error when commit hash is removed [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2022-10-24 18:12:25 +09:00
parent b51b22513f
commit 8873c420d3
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -17,6 +17,6 @@ unless /^[^#]/ !~ (gem = $F[0])
end
end
f = [gem.name, gem.version.to_s, uri, *$F[3..-1]]
$_.gsub!(/\S+\s*/) {|s| f.shift.ljust(s.size)}
$_.gsub!(/\S+\s*/) {|s| (f.shift || "").ljust(s.size)}
$_ = [$_, *f].join(" ") unless f.empty?
end