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

ruby-grape / grape / 33962750950 / 17
97%
master: 99%

Build:
Build:
LAST BUILD BRANCH: perf/plain-union-fast-path
DEFAULT BRANCH: master
Ran 05 Sep 2026 11:19AM UTC
Files 169
Run time 5s
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

05 Sep 2026 11:13AM UTC coverage: 95.921% (+0.008%) from 95.913%
33962750950.17

Pull #2905

github

ericproulx
Nest any route_param requirement, and reject the shapes with no param to attach to

`route_param` nested a lone `requirements:` under the param name only when it
was a Regexp — the shorthand as it was written in 2013, when a Regexp was the
only kind of constraint there was. Anything else, such as the capture types
Mustermann derives from a Class or a Symbol, travelled unwrapped into
`Endpoint#prepare_routes_requirements`, which merges the requirement Hashes of
the namespaces a route sits in, and raised `TypeError: no implicit conversion
of Class into Hash` there. That merge runs when routes are built, so a mistake
in the API's definition surfaced on the first request, from a method that
names neither the route nor the requirement.

Nesting the constraint is what `route_param` is for, so it now nests whatever
it is given. A Hash is refused: keyed by this param it names it twice, and
keyed by another it constrains a capture the namespace does not introduce,
which Mustermann resolves to no constraint at all. Requirements keyed by name
belong on `namespace`, which is also where they are merged.

`namespace` and an endpoint have the opposite constraint — a path can carry
several captures, so there is no param a lone constraint could attach to — and
now reject a non-Hash `requirements` where it is written.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pull Request #2905: Nest any route_param requirement, and reject the shapes with no param to attach to

1223 of 1334 branches covered (91.68%)

Branch coverage included in aggregate %.

3903 of 4010 relevant lines covered (97.33%)

1139.29 hits per line

Source Files on job run-3.3-gemfiles/rails_8_1.gemfile - 33962750950.17
  • Tree
  • List 169
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 33962750950
  • 51e07ee4 on github
  • Prev Job for on route-param-bare-requirements (#33962721300.29)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc