summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-24 18:12:25 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-24 18:12:25 +0900
commit8873c420d34d4573a153dd0d107a0ada099f4d26 (patch)
tree13d4e51c31709910e75a7d4b2d42ae88085529a8
parentb51b22513f6a2a514a9e614e7a9f6e0df6c0c985 (diff)
Fix error when commit hash is removed [ci skip]
-rwxr-xr-xtool/update-bundled_gems.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/update-bundled_gems.rb b/tool/update-bundled_gems.rb
index bed1cfc52b..5ec0528721 100755
--- a/tool/update-bundled_gems.rb
+++ b/tool/update-bundled_gems.rb
@@ -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