+* Prompted by the two reports above, an exhaustive differential audit of `StaticCoverageExtractor` against Ruby's `Coverage` — a fuzzing harness that runs thousands of generated programs through both and diffs the branch tuples, now part of the spec suite (opt-in via `SIMPLECOV_FUZZ=1`) — surfaced and fixed four more mismatches of the same phantom-branch class. Conditions that are compile-time literals (`if true`, `if 1`, a ternary on a literal) are folded away by Ruby's compiler and no longer produce synthesized branches (`while true` still does — loops are not folded). On Ruby 3.3, three legacy conventions now match: the body range of a do-while (`begin ... end while`), the location of empty branch arms (which on 3.3 depends on whether the construct is in value or void position), and one-line pattern matching (`x => pattern` / `x in pattern`), which emits a `:case` branch on 3.3 and nothing on 3.4+. The audit also caught a crash on Ruby 3.3's stdlib Prism (0.19), which still exposes the else clause of `UnlessNode` / `CaseNode` / `CaseMatchNode` under its pre-1.3 name `consequent`: the extractor raised internally and silently dropped simulated branch and method data for any file containing `unless`/`else` or a `case` with an empty arm, unless a newer prism gem happened to be installed.
0 commit comments