From 2f827242aa1abd832c58b0242939464962268796 Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Mon, 8 Sep 2025 12:54:37 -0400 Subject: [PATCH] bump: compare newer_than_upstream values to true When `Enumerable#all?` is called without an argument, it should check whether values are truthy but it doesn't appear to work as expected for the `newer_than_upstream` hash. In this case, `{ general: false }.all?` returns `true` when it seemingly should return `false`. This is preventing autobump from opening PRs for new versions, so I've updated related `all?` calls to use a block with an explicit comparison to `true` as a workaround to fix autobump in the immediate term. --- Library/Homebrew/dev-cmd/bump.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bump.rb b/Library/Homebrew/dev-cmd/bump.rb index 20c88e625a..75e51a208c 100644 --- a/Library/Homebrew/dev-cmd/bump.rb +++ b/Library/Homebrew/dev-cmd/bump.rb @@ -407,7 +407,7 @@ module Homebrew (new_version.general != "unable to get versions") && (new_version.general != "skipped") && (new_version != current_version) && - !newer_than_upstream.all? + !newer_than_upstream.all? { |_k, v| v == true } # We use the ARM version for the pull request version. This is # consistent with the behavior of bump-cask-pr. pull_request_version = if multiple_versions @@ -458,7 +458,7 @@ module Homebrew repology_latest = version_info.repology_latest versions_equal = (new_version == current_version) - all_newer_than_upstream = version_info.newer_than_upstream.all? + all_newer_than_upstream = version_info.newer_than_upstream.all? { |_k, v| v == true } title_name = ambiguous_cask ? "#{name} (cask)" : name title = if (repology_latest == current_version.general || !repology_latest.is_a?(Version)) && versions_equal