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

ruby-grape / grape / 29200085335
97%

Build:
DEFAULT BRANCH: master
Ran 12 Jul 2026 04:25PM UTC
Jobs 32
Files 167
Run time 1min
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

12 Jul 2026 04:24PM UTC coverage: 96.682% (+0.004%) from 96.678%
29200085335

push

github

web-flow
Don't mutate router maps at request time (#2790)

Grape::Router built @map and @optimized_map as auto-vivifying hashes
(Hash.new { |h, k| h[k] = ... }). compile! only fills keys for HTTP
methods that have routes, but at request time #match? and #rotation look
the maps up by the request's method, so any method with no routes inserted
a key into the shared hashes. The router is frozen only shallowly, so the
inner hashes stayed mutable.

That is a data race on runtimes without a GVL (JRuby, TruffleRuby), where
concurrent Hash#[]= corrupts the hash, and unbounded growth everywhere:
each distinct method string becomes a permanent key, so a client sending
arbitrary methods grows the maps without limit.

Use plain hashes, create the array explicitly on append, freeze both maps
after compile!, and read missing keys without inserting (#match? via safe
navigation, #rotation via &.each). Requests with an unrouted method still
resolve to 404/405 exactly as before.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

1130 of 1224 branches covered (92.32%)

Branch coverage included in aggregate %.

7 of 7 new or added lines in 1 file covered. (100.0%)

3591 of 3659 relevant lines covered (98.14%)

23189.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/hashie.gemfile - 29200085335.1 12 Jul 2026 04:26PM UTC 166
62.35
GitHub Action Run
2 run-4.0-gemfiles/grape_swagger.gemfile - 29200085335.2 12 Jul 2026 04:25PM UTC 166
55.18
GitHub Action Run
3 run-4.0-gemfiles/rack_3_2.gemfile - 29200085335.3 12 Jul 2026 04:26PM UTC 166
95.22
GitHub Action Run
4 run-4.0-gemfiles/rack_3_1.gemfile - 29200085335.4 12 Jul 2026 04:26PM UTC 166
95.22
GitHub Action Run
5 run-3.3-gemfiles/rails_7_2.gemfile - 29200085335.5 12 Jul 2026 04:25PM UTC 167
95.23
GitHub Action Run
6 run-3.3-gemfiles/rack_3_1.gemfile - 29200085335.6 12 Jul 2026 04:25PM UTC 166
95.22
GitHub Action Run
7 run-3.4-gemfiles/rails_8_1.gemfile - 29200085335.7 12 Jul 2026 04:25PM UTC 167
95.23
GitHub Action Run
8 run-4.0-gemfiles/multi_xml.gemfile - 29200085335.8 12 Jul 2026 04:25PM UTC 166
47.02
GitHub Action Run
9 run-3.3-gemfiles/rack_3_0.gemfile - 29200085335.9 12 Jul 2026 04:25PM UTC 166
95.22
GitHub Action Run
10 run-4.0-Gemfile - 29200085335.10 12 Jul 2026 04:27PM UTC 166
95.22
GitHub Action Run
11 run-3.4-Gemfile - 29200085335.11 12 Jul 2026 04:25PM UTC 166
95.22
GitHub Action Run
12 run-3.4-gemfiles/rack_2_2.gemfile - 29200085335.12 12 Jul 2026 04:26PM UTC 166
95.18
GitHub Action Run
13 run-3.4-gemfiles/rack_3_1.gemfile - 29200085335.13 12 Jul 2026 04:27PM UTC 166
95.22
GitHub Action Run
14 run-3.4-gemfiles/rack_3_0.gemfile - 29200085335.14 12 Jul 2026 04:26PM UTC 166
95.22
GitHub Action Run
15 run-4.0-gemfiles/rails_8_1.gemfile - 29200085335.15 12 Jul 2026 04:25PM UTC 167
95.23
GitHub Action Run
16 run-4.0-gemfiles/rails_7_2.gemfile - 29200085335.16 12 Jul 2026 04:27PM UTC 167
95.23
GitHub Action Run
17 run-4.0-gemfiles/rack_3_0.gemfile - 29200085335.17 12 Jul 2026 04:26PM UTC 166
95.22
GitHub Action Run
18 run-3.4-gemfiles/rails_7_2.gemfile - 29200085335.18 12 Jul 2026 04:25PM UTC 167
95.23
GitHub Action Run
19 run-4.0-gemfiles/multi_json_1_20.gemfile - 29200085335.19 12 Jul 2026 04:26PM UTC 166
47.59
GitHub Action Run
20 run-3.3-Gemfile - 29200085335.20 12 Jul 2026 04:25PM UTC 166
95.22
GitHub Action Run
21 run-4.0-gemfiles/multi_json.gemfile - 29200085335.21 12 Jul 2026 04:27PM UTC 166
47.55
GitHub Action Run
22 run-4.0-gemfiles/multi_xml_0_8.gemfile - 29200085335.22 12 Jul 2026 04:27PM UTC 166
47.06
GitHub Action Run
23 run-4.0-gemfiles/grape_entity.gemfile - 29200085335.23 12 Jul 2026 04:26PM UTC 166
50.34
GitHub Action Run
24 run-4.0-gemfiles/rails_8_0.gemfile - 29200085335.24 12 Jul 2026 04:26PM UTC 167
95.23
GitHub Action Run
25 run-4.0-gemfiles/dry_validation.gemfile - 29200085335.25 12 Jul 2026 04:26PM UTC 166
58.19
GitHub Action Run
26 run-3.3-gemfiles/rails_8_0.gemfile - 29200085335.26 12 Jul 2026 04:27PM UTC 167
95.23
GitHub Action Run
27 run-3.3-gemfiles/rack_2_2.gemfile - 29200085335.27 12 Jul 2026 04:25PM UTC 166
95.18
GitHub Action Run
28 run-3.4-gemfiles/rack_3_2.gemfile - 29200085335.28 12 Jul 2026 04:27PM UTC 166
95.22
GitHub Action Run
29 run-3.4-gemfiles/rails_8_0.gemfile - 29200085335.29 12 Jul 2026 04:27PM UTC 167
95.23
GitHub Action Run
30 run-4.0-gemfiles/rack_2_2.gemfile - 29200085335.30 12 Jul 2026 04:25PM UTC 166
95.18
GitHub Action Run
31 run-3.3-gemfiles/rails_8_1.gemfile - 29200085335.31 12 Jul 2026 04:27PM UTC 167
95.23
GitHub Action Run
32 run-3.3-gemfiles/rack_3_2.gemfile - 29200085335.32 12 Jul 2026 04:27PM UTC 166
95.22
GitHub Action Run
Source Files on build 29200085335
  • Tree
  • List 167
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29200085335
  • c8417f21 on github
  • Prev Build on master (#29198375214)
  • Next Build on master (#29200240078)
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