Module: Optimize::Contract
- Defined in:
- lib/optimize/contract.rb
Overview
The hardcoded ground rules the optimizer assumes. Accepting the optimizer means accepting all five. Breaking any is a miscompile, not a slowdown.
Constant Summary collapse
- CLAUSES =
{ no_bop_redefinition: "Core basic operations (Integer#+, Array#[], String#==, ...) are not redefined.", no_prepend_after_load: "No `prepend` into any class after load; method tables are stable.", rbs_signatures_truthful: "Inline RBS signatures accurately describe runtime types.", env_read_only: "`ENV` is read-only after load; `ENV[\"X\"]` resolves once.", no_constant_reassignment: "Top-level constants are assigned exactly once; no `const_set` after load.", }.freeze