|
Ruby 4.1.0dev (2026-09-05 revision 4d185cce781e2957bd2d7a3e140348b00a0d81d0)
|

Go to the source code of this file.
Macros | |
| #define | PRISM_ASSUME(expr_) __builtin_assume(expr_) |
| Tell the compiler that the given expression can be assumed to be true. | |
| #define PRISM_ASSUME | ( | expr_ | ) | __builtin_assume(expr_) |
Tell the compiler that the given expression can be assumed to be true.
Unlike assert, this emits no runtime check — it only feeds the optimizer's value range analysis so it can prune impossible paths. Use it to communicate an invariant the caller guarantees but that the compiler cannot otherwise prove.