Skip to content

Commit 77fbbfb

Browse files
authored
Merge pull request #691 from casperisfine/ruby-3.2-raise
Fix the Kernel#raise patch to be Ruby 3.2 compatible
2 parents 4581232 + 21e272f commit 77fbbfb

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
ruby: [ '2.7', '3.0.2', '3.1', 'head' ]
9+
ruby: [ '2.7', '3.0.2', '3.1', '3.2', 'head' ]
1010
rails: [ '6.0', '6.1', '7.0', 'edge' ]
1111
exclude:
1212
- ruby: '3.1'
1313
rails: '6.0'
1414
- ruby: '3.1'
1515
rails: '6.1'
16+
- ruby: '3.2'
17+
rails: '6.0'
18+
- ruby: '3.2'
19+
rails: '6.1'
1620

1721
env:
1822
RAILS_VERSION: ${{ matrix.rails }}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Next Release
22

3+
* Fix a small compatibility issue with Ruby 3.2 causing `Kernel#raise` to not accept a `cause`.
4+
35
## 4.1.0
46

57
* * Fix bug which makes commands to freeze when the Rails application is writing to STDERR.

lib/spring/application.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ def shush_backtraces
302302
Kernel.module_eval do
303303
old_raise = Kernel.method(:raise)
304304
remove_method :raise
305-
define_method :raise do |*args|
305+
define_method :raise do |*args, **kwargs|
306306
begin
307-
old_raise.call(*args)
307+
old_raise.call(*args, **kwargs)
308308
ensure
309309
if $!
310310
lib = File.expand_path("..", __FILE__)

0 commit comments

Comments
 (0)