We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11d86bd commit 2ca97d4Copy full SHA for 2ca97d4
core/tracepoint/raised_exception_spec.rb
@@ -17,4 +17,22 @@
17
raised_exception.should equal(error_result)
18
end
19
20
+
21
+ ruby_version_is "3.3" do
22
+ it 'returns value from exception rescued on the :rescue event' do
23
+ raised_exception, error_result = nil
24
+ trace = TracePoint.new(:rescue) { |tp|
25
+ next unless TracePointSpec.target_thread?
26
+ raised_exception = tp.raised_exception
27
+ }
28
+ trace.enable do
29
+ begin
30
+ raise StandardError
31
+ rescue => e
32
+ error_result = e
33
+ end
34
+ raised_exception.should equal(error_result)
35
36
37
38
0 commit comments