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

ruby-grape / grape / 30485393298 / 14
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 29 Jul 2026 07:41PM UTC
Files 167
Run time 6s
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

29 Jul 2026 07:39PM UTC coverage: 95.579% (-0.005%) from 95.584%
30485393298.14

push

github

web-flow
Return the compiled instance from Grape::API::Instance.compile! (#2835)

.call and .recognize_path compiled the API and then read @instance again
to serve the request:

    def call(env)
      compile!
      @instance.call(env)
    end

change! (which `helpers` and `mount` invoke on a live API) sets @instance
to nil, so a change! landing between the two reads leaves both methods
calling nil -- NoMethodError: undefined method 'call' for nil.

Have compile! hand back the instance it compiled and let both callers use
that value, so the read is atomic. compile! previously returned nil when
the API was already compiled, so always returning the instance is a
strict superset of its old contract.

The window is small in practice -- a request thread spends nearly all of
its time inside `new` when recompiling -- so this is a latent race rather
than one reproduced under natural contention; the specs drive change!
into the window deterministically.

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

1167 of 1280 branches covered (91.17%)

Branch coverage included in aggregate %.

3741 of 3855 relevant lines covered (97.04%)

1116.39 hits per line

Source Files on job run-3.4-gemfiles/rails_8_1.gemfile - 30485393298.14
  • 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 Build 30485393298
  • 1893fb46 on github
  • Prev Job for on master (#30306029090.8)
  • Next Job for on master (#30485610217.4)
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