mirror of
https://github.com/Homebrew/brew.git
synced 2026-08-12 22:29:27 +04:00
- Ruby 4.0's `continuation` warns `callcc is obsolete; use Fiber instead` whenever it is required, which happens on every `brew` command that loads a formula from source. - Run `Ignorable.hook_raise` blocks in a `Fiber`: `raise` now pauses at the raise site and asks an `on_ignorable` callback whether to resume (`:ignore`) or raise there as usual, replacing the rescue plus continuation jump and `Ignorable::ExceptionMixin#ignore`. - `Debrew` menus and `Formulary` `ignore_errors` decisions now happen before the stack unwinds, so `ensure` blocks only run when an exception is actually raised. - Only require `ignorable` when `Formulary` uses `ignore_errors` and drop the obsolete `brew verify-undefined` `Warnings` guard. Fixes https://github.com/Homebrew/brew/issues/23384
9 lines
217 B
Ruby
9 lines
217 B
Ruby
# typed: strict
|
|
|
|
# Sorbet's core RBI for `Fiber` is missing `initialize` so does not know
|
|
# `Fiber.new` takes a block.
|
|
class Fiber
|
|
sig { params(blk: T.proc.returns(T.untyped)).void }
|
|
def initialize(&blk); end
|
|
end
|