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

ruby-grape / grape / 24754666104
97%

Build:
DEFAULT BRANCH: master
Ran 22 Apr 2026 01:03AM UTC
Jobs 37
Files 155
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

22 Apr 2026 01:03AM UTC coverage: 96.999% (+0.001%) from 96.998%
24754666104

push

github

web-flow
Return frozen EMPTY array from StackableValues on miss (#2690)

`StackableValues#[]` is the accessor behind `namespace_stackable[key]` —
called multiple times per request (five filter phases, plus ad-hoc
settings lookups). When neither `inherited_values` nor `new_values`
have an entry for the key, the old `return new_value || []` allocated
a fresh empty array on every miss.

Introduce a frozen `EMPTY` singleton and return it in the miss branch.
Saves two short-lived empty-array allocations per request in the
realistic shape (some filters set, some not) and up to five in the
worst case.

One caller (`Endpoint#initialize`) stored `namespace_stackable[:validations]`
directly into `route[:saved_validations]` by reference, and later
`.concat`'d parent validations into it via `inherit_settings`. With the
stackable now able to return a frozen array, that mutation would
`FrozenError`. Dup at capture so the route keeps its own mutable list —
good hygiene regardless of this change.

Realistic (3 keys populated, 2 absent):
  current: 2.01 M i/s, 80B / 2 objects allocated
  variant: 2.19 M i/s, 0B / 0 objects allocated

Worst case (all 5 absent):
  current: 2.18 M i/s, 200B / 5 objects
  variant: 2.49 M i/s, 0B / 0 objects  (1.14x faster)

No behavior change; all 2,236 specs pass.

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

1077 of 1161 branches covered (92.76%)

Branch coverage included in aggregate %.

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

3351 of 3404 relevant lines covered (98.44%)

32225.3 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.4-gemfiles/rack_3_0.gemfile - 24754666104.1 22 Apr 2026 01:04AM UTC 154
95.67
GitHub Action Run
2 run-3.3-gemfiles/rails_7_2.gemfile - 24754666104.2 22 Apr 2026 01:04AM UTC 155
95.66
GitHub Action Run
3 run-4.0-Gemfile - 24754666104.3 22 Apr 2026 01:04AM UTC 154
95.67
GitHub Action Run
4 run-3.2-gemfiles/rack_3_0.gemfile - 24754666104.4 22 Apr 2026 01:04AM UTC 154
95.7
GitHub Action Run
5 run-3.3-gemfiles/rails_8_1.gemfile - 24754666104.5 22 Apr 2026 01:04AM UTC 155
95.66
GitHub Action Run
6 run-3.2-gemfiles/rack_3_1.gemfile - 24754666104.6 22 Apr 2026 01:03AM UTC 154
95.7
GitHub Action Run
7 run-4.0-gemfiles/rack_3_0.gemfile - 24754666104.7 22 Apr 2026 01:03AM UTC 154
95.67
GitHub Action Run
8 run-3.4-gemfiles/rails_7_2.gemfile - 24754666104.8 22 Apr 2026 01:04AM UTC 155
95.68
GitHub Action Run
9 run-4.0-gemfiles/rails_8_1.gemfile - 24754666104.9 22 Apr 2026 01:04AM UTC 155
95.68
GitHub Action Run
10 run-3.3-Gemfile - 24754666104.10 22 Apr 2026 01:04AM UTC 154
95.65
GitHub Action Run
11 run-4.0-gemfiles/rack_3_2.gemfile - 24754666104.11 22 Apr 2026 01:03AM UTC 154
95.67
GitHub Action Run
12 run-4.0-gemfiles/rack_3_1.gemfile - 24754666104.12 22 Apr 2026 01:04AM UTC 154
95.67
GitHub Action Run
13 run-3.3-gemfiles/rack_3_0.gemfile - 24754666104.13 22 Apr 2026 01:04AM UTC 154
95.65
GitHub Action Run
14 run-4.0-gemfiles/dry_validation.gemfile - 24754666104.14 22 Apr 2026 01:03AM UTC 154
57.8
GitHub Action Run
15 run-3.3-gemfiles/rack_3_1.gemfile - 24754666104.15 22 Apr 2026 01:04AM UTC 154
95.65
GitHub Action Run
16 run-3.2-gemfiles/rails_7_2.gemfile - 24754666104.16 22 Apr 2026 01:04AM UTC 155
95.7
GitHub Action Run
17 run-3.4-gemfiles/rack_3_2.gemfile - 24754666104.17 22 Apr 2026 01:04AM UTC 154
95.67
GitHub Action Run
18 run-4.0-gemfiles/rails_7_2.gemfile - 24754666104.18 22 Apr 2026 01:04AM UTC 155
95.68
GitHub Action Run
19 run-3.4-gemfiles/rack_2_2.gemfile - 24754666104.19 22 Apr 2026 01:04AM UTC 154
95.63
GitHub Action Run
20 run-3.4-Gemfile - 24754666104.20 22 Apr 2026 01:04AM UTC 154
95.67
GitHub Action Run
21 run-4.0-gemfiles/hashie.gemfile - 24754666104.21 22 Apr 2026 01:03AM UTC 154
62.49
GitHub Action Run
22 run-3.2-gemfiles/rack_2_2.gemfile - 24754666104.22 22 Apr 2026 01:04AM UTC 154
95.65
GitHub Action Run
23 run-3.4-gemfiles/rails_8_0.gemfile - 24754666104.23 22 Apr 2026 01:04AM UTC 155
95.68
GitHub Action Run
24 run-4.0-gemfiles/rack_2_2.gemfile - 24754666104.24 22 Apr 2026 01:04AM UTC 154
95.63
GitHub Action Run
25 run-3.2-Gemfile - 24754666104.25 22 Apr 2026 01:03AM UTC 154
95.7
GitHub Action Run
26 run-3.2-gemfiles/rails_8_1.gemfile - 24754666104.26 22 Apr 2026 01:03AM UTC 155
95.7
GitHub Action Run
27 run-4.0-gemfiles/rails_8_0.gemfile - 24754666104.27 22 Apr 2026 01:04AM UTC 155
95.68
GitHub Action Run
28 run-4.0-gemfiles/grape_entity.gemfile - 24754666104.28 22 Apr 2026 01:04AM UTC 154
49.45
GitHub Action Run
29 run-3.2-gemfiles/rails_8_0.gemfile - 24754666104.29 22 Apr 2026 01:04AM UTC 155
95.7
GitHub Action Run
30 run-3.3-gemfiles/rails_8_0.gemfile - 24754666104.30 22 Apr 2026 01:04AM UTC 155
95.66
GitHub Action Run
31 run-3.4-gemfiles/rack_3_1.gemfile - 24754666104.31 22 Apr 2026 01:04AM UTC 154
95.67
GitHub Action Run
32 run-4.0-gemfiles/multi_json.gemfile - 24754666104.32 22 Apr 2026 01:03AM UTC 154
35.97
GitHub Action Run
33 run-4.0-gemfiles/multi_xml.gemfile - 24754666104.33 22 Apr 2026 01:04AM UTC 154
35.97
GitHub Action Run
34 run-3.3-gemfiles/rack_2_2.gemfile - 24754666104.34 22 Apr 2026 01:04AM UTC 154
95.61
GitHub Action Run
35 run-3.4-gemfiles/rails_8_1.gemfile - 24754666104.35 22 Apr 2026 01:04AM UTC 155
95.68
GitHub Action Run
36 run-3.3-gemfiles/rack_3_2.gemfile - 24754666104.36 22 Apr 2026 01:04AM UTC 154
95.65
GitHub Action Run
37 run-3.2-gemfiles/rack_3_2.gemfile - 24754666104.37 22 Apr 2026 01:03AM UTC 154
95.7
GitHub Action Run
Source Files on build 24754666104
  • Tree
  • List 155
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #24754666104
  • 66aadadf on github
  • Prev Build on master (#24754575829)
  • Next Build on master (#24754755957)
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