Files
brew/Library/Homebrew/sorbet/rbi/shims/fiber.rbi
T
Mike McQuaid 0c2baca69e ignorable: replace callcc with Fiber
- 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
2026-08-01 14:28:57 +01:00

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