Fix return type of Formula.build

This commit is contained in:
Douglas Eichelberger 2025-02-25 08:59:53 -08:00
parent 7c514724af
commit 6cd9daffdf
No known key found for this signature in database
GPG Key ID: F90193CBD547EB81
2 changed files with 2 additions and 1 deletions

View File

@ -3703,7 +3703,7 @@ class Formula
sig { params(block: T.proc.bind(BottleSpecification).void).void }
def bottle(&block) = stable.bottle(&block)
sig { returns(String) }
sig { returns(BuildOptions) }
def build = stable.build
# Get the `BUILD_FLAGS` from the formula's namespace set in `Formulary::load_formula`.

View File

@ -549,6 +549,7 @@ RSpec.describe Formula do
expect(f.homepage).to eq("https://brew.sh")
expect(f.version).to eq(Version.new("0.1"))
expect(f).to be_stable
expect(f.build).to be_a(BuildOptions)
expect(f.stable.version).to eq(Version.new("0.1"))
expect(f.head.version).to eq(Version.new("HEAD"))
end