• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-grape / grape / 24754841764 / 9
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 22 Apr 2026 01:10AM UTC
Files 154
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Apr 2026 01:09AM UTC coverage: 95.685% (-0.02%) from 95.701%
24754841764.9

push

github

web-flow
Replace per-request Proc in Router#transaction with a helper method (#2692)

The `cascade_or_return_response` proc inside `Router#transaction` was
allocated on every request because it relied on non-local `return` to
exit the enclosing method when a non-cascading response arrived. That
behavior was doing two things at once — closing the cascading body as
a side effect, and halting transaction processing.

Split them: a plain `halt?(response)` helper returns `true` when the
response is final (and should be returned as-is), `false` when it's
either absent or cascading; closing the body lives inside the helper
as a side effect. The `transaction` method then uses explicit
early-returns for the halt case and plain assignments for the cascade
flag.

                      current     variant    speedup     alloc
cascading response    3.12 M/s    6.88 M/s   2.21x      1 → 0 objects
hit response (final)  3.07 M/s    9.82 M/s   3.20x      1 → 0 objects
nil response          5.07 M/s    15.7 M/s   3.10x      1 → 0 objects

Saves one proc allocation per request in the router's `transaction`
dispatch — plus 2–3x faster control flow in the cascade-decision step.

No behavior change; all 2,236 specs pass.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

1055 of 1163 branches covered (90.71%)

Branch coverage included in aggregate %.

3313 of 3402 relevant lines covered (97.38%)

1008.29 hits per line

Source Files on job run-3.2-gemfiles/rack_3_0.gemfile - 24754841764.9
  • Tree
  • List 154
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24754841764
  • f1e54e1b on github
  • Prev Job for on master (#24754755957.22)
  • Next Job for on master (#24756585669.15)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc