Commit f082bcf
runtime(cruby): the overlay Request answers
There are two `ActionDispatch::Request` implementations — the shared
transpilable one (`runtime/ruby/action_dispatch/request.rb`) and the
CRuby overlay over the CGI env, which is the one `main.rb` actually
requires. The shared one has always had `host`; the overlay built the
same string INSIDE `base_url` and exposed nothing.
That made `Rails.application.domain` — the framework default every
`_url` helper grounds against, added in 7a09ba9 as
`ActionController::Current.request.host` — raise NoMethodError on any
app that does not define `domain` itself. campfire's message row links
each message by `room_at_message_url`, so it was every message.
`base_url` now composes from it rather than repeating the fetch, so
the two cannot drift.
Verified over the batch: cargo test (all green), compare ruby 7/7,
smoke ruby 6/6, crystal 3/3 + rust 2/2 + spinel 1/1. The lobsters emit
differs in exactly this one runtime file and nowhere else.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>#host
1 parent 872b754 commit f082bcf
1 file changed
Lines changed: 11 additions & 1 deletion
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
65 | 76 | | |
66 | 77 | | |
67 | | - | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
0 commit comments