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

ruby-grape / grape / 34032439853
99%

Build:
DEFAULT BRANCH: master
Ran 06 Sep 2026 12:13PM UTC
Jobs 32
Files 169
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

06 Sep 2026 12:12PM UTC coverage: 99.196%. Remained the same
34032439853

push

github

web-flow
Copy response headers with merge! instead of merge (#2911)

`Grape::Util::Header.new.merge(headers)` appears twice on a request
path, and `merge` is a `dup` plus a `merge!` — so the Header built on
the same line is allocated only to be thrown away. `merge!` fills the
one already in hand and returns it, halving the cost:

* `Grape::API::Instance#call`, on every request when `cascade false` is
  set — the usual configuration for Grape mounted inside Rails.
* `Grape::Middleware::Error#rack_response`, on every error response.

Both copies stay. `headers` can come from a mounted Rack app, which is
free to hand back a frozen or shared Hash, and both call sites go on to
write into what they are given. The `cascade false` path is now pinned
by a spec that mounts a Rack app returning a frozen Hash; without the
copy it raises `FrozenError`.

`merge!` behaves the same on both halves of the supported Rack range:
Rack 2.2's `HeaderHash#merge!` is `other.each { |k, v| self[k] = v }`,
and Rack 3 aliases `merge!` to `update`. Both route through the
overridden `[]=`, so header names are still downcased. Note that the
shorter-looking `Grape::Util::Header.new(headers)` is not equivalent:
`Rack::Headers` subclasses `Hash`, so on Rack 3 the argument becomes
the default value and the result is empty.

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

1291 of 1334 branches covered (96.78%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 2 files covered. (100.0%)

4013 of 4013 relevant lines covered (100.0%)

27153.89 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.4-gemfiles/rails_7_2.gemfile - 34032439853.1 06 Sep 2026 12:13PM UTC 169
97.89
GitHub Action Run
2 run-4.0-gemfiles/grape_entity.gemfile - 34032439853.2 06 Sep 2026 12:13PM UTC 167
50.33
GitHub Action Run
3 run-4.0-Gemfile - 34032439853.3 06 Sep 2026 12:13PM UTC 168
97.88
GitHub Action Run
4 run-3.4-gemfiles/rack_3_1.gemfile - 34032439853.4 06 Sep 2026 12:13PM UTC 168
97.88
GitHub Action Run
5 run-3.3-gemfiles/rack_3_0.gemfile - 34032439853.5 06 Sep 2026 12:13PM UTC 168
97.9
GitHub Action Run
6 run-4.0-gemfiles/rails_7_2.gemfile - 34032439853.6 06 Sep 2026 12:13PM UTC 169
97.89
GitHub Action Run
7 run-4.0-gemfiles/multi_json_1_20.gemfile - 34032439853.7 06 Sep 2026 12:13PM UTC 167
47.56
GitHub Action Run
8 run-3.4-gemfiles/rails_8_0.gemfile - 34032439853.8 06 Sep 2026 12:13PM UTC 169
97.87
GitHub Action Run
9 run-4.0-gemfiles/rack_3_0.gemfile - 34032439853.9 06 Sep 2026 12:13PM UTC 168
97.88
GitHub Action Run
10 run-4.0-gemfiles/dry_validation.gemfile - 34032439853.10 06 Sep 2026 12:13PM UTC 167
57.8
GitHub Action Run
11 run-3.3-Gemfile - 34032439853.11 06 Sep 2026 12:13PM UTC 168
97.9
GitHub Action Run
12 run-4.0-gemfiles/rails_8_1.gemfile - 34032439853.12 06 Sep 2026 12:13PM UTC 169
97.89
GitHub Action Run
13 run-3.3-gemfiles/rack_2_2.gemfile - 34032439853.13 06 Sep 2026 12:13PM UTC 168
97.87
GitHub Action Run
14 run-4.0-gemfiles/hashie.gemfile - 34032439853.14 06 Sep 2026 12:13PM UTC 167
61.77
GitHub Action Run
15 run-3.3-gemfiles/rack_3_1.gemfile - 34032439853.15 06 Sep 2026 12:13PM UTC 168
97.88
GitHub Action Run
16 run-4.0-gemfiles/grape_swagger.gemfile - 34032439853.16 06 Sep 2026 12:13PM UTC 167
55.24
GitHub Action Run
17 run-3.4-gemfiles/rack_3_0.gemfile - 34032439853.17 06 Sep 2026 12:13PM UTC 168
97.87
GitHub Action Run
18 run-3.3-gemfiles/rails_7_2.gemfile - 34032439853.18 06 Sep 2026 12:13PM UTC 169
97.9
GitHub Action Run
19 run-3.3-gemfiles/rails_8_0.gemfile - 34032439853.19 06 Sep 2026 12:13PM UTC 169
97.89
GitHub Action Run
20 run-4.0-gemfiles/rack_3_1.gemfile - 34032439853.20 06 Sep 2026 12:13PM UTC 168
97.87
GitHub Action Run
21 run-4.0-gemfiles/multi_json.gemfile - 34032439853.21 06 Sep 2026 12:13PM UTC 167
47.53
GitHub Action Run
22 run-4.0-gemfiles/rack_3_2.gemfile - 34032439853.22 06 Sep 2026 12:13PM UTC 168
97.88
GitHub Action Run
23 run-3.4-Gemfile - 34032439853.23 06 Sep 2026 12:13PM UTC 168
97.88
GitHub Action Run
24 run-4.0-gemfiles/rails_8_0.gemfile - 34032439853.24 06 Sep 2026 12:13PM UTC 169
97.87
GitHub Action Run
25 run-4.0-gemfiles/multi_xml_0_8.gemfile - 34032439853.25 06 Sep 2026 12:13PM UTC 167
47.04
GitHub Action Run
26 run-4.0-gemfiles/rack_2_2.gemfile - 34032439853.26 06 Sep 2026 12:13PM UTC 168
97.85
GitHub Action Run
27 run-3.3-gemfiles/rack_3_2.gemfile - 34032439853.27 06 Sep 2026 12:13PM UTC 168
97.9
GitHub Action Run
28 run-3.4-gemfiles/rack_2_2.gemfile - 34032439853.28 06 Sep 2026 12:13PM UTC 168
97.83
GitHub Action Run
29 run-4.0-gemfiles/multi_xml.gemfile - 34032439853.29 06 Sep 2026 12:13PM UTC 167
47.0
GitHub Action Run
30 run-3.3-gemfiles/rails_8_1.gemfile - 34032439853.30 06 Sep 2026 12:13PM UTC 169
97.9
GitHub Action Run
31 run-3.4-gemfiles/rails_8_1.gemfile - 34032439853.31 06 Sep 2026 12:13PM UTC 169
97.87
GitHub Action Run
32 run-3.4-gemfiles/rack_3_2.gemfile - 34032439853.32 06 Sep 2026 12:13PM UTC 168
97.87
GitHub Action Run
Source Files on build 34032439853
  • Tree
  • List 169
  • Changed 3
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34032439853
  • abd37397 on github
  • Prev Build on master (#34030591620)
  • Next Build on master (#34032720543)
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