Commit 07f3fe4
Fix Ruby 3 keyword arg issue in ActionCable broadcast
In Ruby 3, bare `key: val` syntax is always treated as keyword arguments.
`ActionCable::Server::Broadcasting#broadcast` expects its second argument
(`message`) as a positional parameter, not a keyword. The call:
ActionCable.server.broadcast(channel, message: x, data: y)
silently raised `ArgumentError: wrong number of arguments (given 1, expected 2)`
in Ruby 3, which was rescued by the controller — causing all ActionCable
broadcasts to silently fail (no real-time updates to other connected clients).
Fix: wrap the hash in explicit braces so Ruby passes it as a positional arg.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 5ce02b2 commit 07f3fe4
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
0 commit comments