Merge pull request #20349 from Homebrew/odisabled_fix

extend/kernel: fix odisabled call.
This commit is contained in:
Mike McQuaid 2025-08-01 11:36:21 +00:00 committed by GitHub
commit 53b900663a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -223,16 +223,15 @@ module Kernel
end end
sig { sig {
params(method: String, replacement: T.nilable(T.any(String, Symbol)), disable: T::Boolean, params(method: String, replacement: T.nilable(T.any(String, Symbol)),
disable_on: T.nilable(Time), disable_for_developers: T::Boolean, caller: T::Array[String]).void disable_on: T.nilable(Time), disable_for_developers: T::Boolean, caller: T::Array[String]).void
} }
def odisabled(method, replacement = nil, def odisabled(method, replacement = nil,
disable: false,
disable_on: nil, disable_on: nil,
disable_for_developers: true, disable_for_developers: true,
caller: send(:caller)) caller: send(:caller))
# This odeprecated should stick around indefinitely. # This odeprecated should stick around indefinitely.
odeprecated(method, replacement, disable:, disable_on:, disable_for_developers:, caller:) odeprecated(method, replacement, disable: true, disable_on:, disable_for_developers:, caller:)
end end
sig { params(formula: T.any(String, Formula)).returns(String) } sig { params(formula: T.any(String, Formula)).returns(String) }