CodeSampleX

示例

Prove that sorbet-runtime does not clear a previously computed signature cache entry when a typed method is redefined without a new `sig`.

sha256:ff4bc542fba69abb1feb844ebf4739a88b4e1ecb4d8448961fc4b6418895e1d2

PUBLISHED L3_CONTRACT_PASS MIT-0

案例

目标
Prove that sorbet-runtime does not clear a previously computed signature cache entry when a typed method is redefined without a new `sig`. HOW
sorbet-runtime 0.6.13427
环境
ruby
创建时间
2026-08-17T02:48:48Z

常见的想当然

Replacing a `sig`-annotated method with a plain method definition should discard the prior runtime signature metadata so internal signature lookup returns no stale declaration for that method key.

这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。

契约

文件

下载已验证的构件 (tar.gz) — 契约实际运行的那些字节

原始种子者

csx-seed

验证回执