summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/core/tracepoint/inspect_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/ruby/core/tracepoint/inspect_spec.rb b/spec/ruby/core/tracepoint/inspect_spec.rb
index cc6bf0f842..0c94a94d5c 100644
--- a/spec/ruby/core/tracepoint/inspect_spec.rb
+++ b/spec/ruby/core/tracepoint/inspect_spec.rb
@@ -24,6 +24,8 @@ describe 'TracePoint#inspect' do
line = nil
TracePoint.new(:line) { |tp|
next unless TracePointSpec.target_thread?
+ next unless tp.path == __FILE__
+
inspect ||= tp.inspect
}.enable do
line = __LINE__
@@ -37,6 +39,8 @@ describe 'TracePoint#inspect' do
line = nil
TracePoint.new(:call) { |tp|
next unless TracePointSpec.target_thread?
+ next unless tp.path == __FILE__
+
inspect ||= tp.inspect
}.enable do
line = __LINE__ + 1
@@ -52,6 +56,8 @@ describe 'TracePoint#inspect' do
line = nil
TracePoint.new(:return) { |tp|
next unless TracePointSpec.target_thread?
+ next unless tp.path == __FILE__
+
inspect ||= tp.inspect
}.enable do
line = __LINE__ + 4
@@ -69,6 +75,8 @@ describe 'TracePoint#inspect' do
inspect = nil
tracepoint = TracePoint.new(:c_call) { |tp|
next unless TracePointSpec.target_thread?
+ next unless tp.path == __FILE__
+
inspect ||= tp.inspect
}
line = __LINE__ + 2
@@ -84,6 +92,8 @@ describe 'TracePoint#inspect' do
line = nil
TracePoint.new(:class) { |tp|
next unless TracePointSpec.target_thread?
+ next unless tp.path == __FILE__
+
inspect ||= tp.inspect
}.enable do
line = __LINE__ + 1
@@ -100,6 +110,7 @@ describe 'TracePoint#inspect' do
thread_inspection = nil
TracePoint.new(:thread_begin) { |tp|
next unless Thread.current == thread
+
inspect ||= tp.inspect
}.enable(target_thread: nil) do
thread = Thread.new {}
@@ -116,6 +127,7 @@ describe 'TracePoint#inspect' do
thread_inspection = nil
TracePoint.new(:thread_end) { |tp|
next unless Thread.current == thread
+
inspect ||= tp.inspect
}.enable(target_thread: nil) do
thread = Thread.new {}