Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Custom Spring commands that implement `#binstub_prelude` will have that
snippet of code inserted into generated binstubs just after Spring is
set up. #329 - @merhard
* Change monkey-patched `Kernel.raise` from public to private (to match default Ruby behavior) #351 - @mattbrictson

## 1.1.3

Expand Down
1 change: 1 addition & 0 deletions lib/spring/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ def shush_backtraces
end
end
end
private :raise
end
end

Expand Down
5 changes: 5 additions & 0 deletions test/acceptance/app_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,9 @@ def binstub_prelude
assert_success %(bin/rails runner 'p ENV["OMG"]'), stdout: "2"
assert_success %(bin/rails runner 'p ENV.key?("FOO")'), stdout: "false"
end

test "Kernel.raise remains private" do
expr = "p Kernel.private_instance_methods.include?(:raise)"
assert_success %(bin/rails runner '#{expr}'), stdout: "true"
end
end