From 2e3da29b1258e38fa797cd9f40f92ea16d1de8a9 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Wed, 21 Oct 2026 15:35:57 -0700 Subject: [PATCH] Fix the RubyGems step of the release publishing script Motivation ---------- plan_rubygems_push returns the gems already on rubygems.org as an Array of [gem, spec] pairs. push_to_rubygems iterates it with each_value, which Array does not define. The step therefore raises NoMethodError on every run, in dry-run and with --execute, before any gem is pushed. Modifications ------------- The skip list holds the gem specification alone, and push_to_rubygems iterates it with each. Results ------- A dry run of the RubyGems step lists the gems already live and the gems it would push. --- bin/publish-release.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/publish-release.rb b/bin/publish-release.rb index c7cc2d69..f2a006bb 100755 --- a/bin/publish-release.rb +++ b/bin/publish-release.rb @@ -464,7 +464,7 @@ def plan_rubygems_push(gems) elsif published["sha"] && published["sha"] != local mismatch << [gem, spec, local, published["sha"]] else - skip << [gem, spec] + skip << spec end end [to_push, skip, mismatch] @@ -498,7 +498,7 @@ def push_to_rubygems(gems, version, runner) abort!("live gems differ from the built ones — investigate before publishing (nothing was pushed)") end - skip.each_value { |spec| puts " already live (checksum matches), skipping: #{spec.name} #{spec.version} #{spec.platform}" } + skip.each { |spec| puts " already live (checksum matches), skipping: #{spec.name} #{spec.version} #{spec.platform}" } if to_push.empty? puts "Nothing to push — every gem is already on rubygems.org."