Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import manually changes in ruby/ruby#10947 #1157

Merged
merged 1 commit into from
Jun 10, 2024
Merged
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
12 changes: 12 additions & 0 deletions core/tracepoint/inspect_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
line = nil
TracePoint.new(:line) { |tp|
next unless TracePointSpec.target_thread?
next unless tp.path == __FILE__

inspect ||= tp.inspect
}.enable do
line = __LINE__
Expand All @@ -37,6 +39,8 @@
line = nil
TracePoint.new(:call) { |tp|
next unless TracePointSpec.target_thread?
next unless tp.path == __FILE__

inspect ||= tp.inspect
}.enable do
line = __LINE__ + 1
Expand All @@ -52,6 +56,8 @@ def trace_point_spec_test_call; end
line = nil
TracePoint.new(:return) { |tp|
next unless TracePointSpec.target_thread?
next unless tp.path == __FILE__

inspect ||= tp.inspect
}.enable do
line = __LINE__ + 4
Expand All @@ -69,6 +75,8 @@ def trace_point_spec_test_return
inspect = nil
tracepoint = TracePoint.new(:c_call) { |tp|
next unless TracePointSpec.target_thread?
next unless tp.path == __FILE__

inspect ||= tp.inspect
}
line = __LINE__ + 2
Expand All @@ -84,6 +92,8 @@ def trace_point_spec_test_return
line = nil
TracePoint.new(:class) { |tp|
next unless TracePointSpec.target_thread?
next unless tp.path == __FILE__

inspect ||= tp.inspect
}.enable do
line = __LINE__ + 1
Expand All @@ -100,6 +110,7 @@ class TracePointSpec::C
thread_inspection = nil
TracePoint.new(:thread_begin) { |tp|
next unless Thread.current == thread

inspect ||= tp.inspect
}.enable(target_thread: nil) do
thread = Thread.new {}
Expand All @@ -116,6 +127,7 @@ class TracePointSpec::C
thread_inspection = nil
TracePoint.new(:thread_end) { |tp|
next unless Thread.current == thread

inspect ||= tp.inspect
}.enable(target_thread: nil) do
thread = Thread.new {}
Expand Down