From 879b7a5dd8c73af0a405e5c036229dd5821d8091 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Sun, 24 Aug 2025 14:07:57 -0400 Subject: [PATCH] Work around `PathnameWriteMkpath` refinement recursion error --- Library/Homebrew/formulary.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 5949373096..711c319f46 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -1,4 +1,4 @@ -# typed: strict +# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "digest/sha2" @@ -116,7 +116,6 @@ module Formulary # TODO: migrate away from refinements here, they don't play nicely with Sorbet # rubocop:todo Sorbet/BlockMethodDefinition refine Pathname do - sig { params(content: Object, offset: T.nilable(Integer), open_args: T.untyped).returns(Integer) } def write(content, offset = nil, **open_args) T.bind(self, Pathname) raise "Will not overwrite #{self}" if exist? && !offset && !open_args[:mode]&.match?(/^a\+?$/)