Skip to content

Commit 90c8587

Browse files
committed
Fix shadowing variable
1 parent 3107d98 commit 90c8587

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/tracepoint/inspect_spec.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,12 @@ def trace_point_spec_test_return
6464

6565
it 'returns a String showing the event, method, path and line for a :c_call event' do
6666
inspect = nil
67-
line = nil
68-
tp = TracePoint.new(:c_call) { |tp|
67+
tracepoint = TracePoint.new(:c_call) { |tp|
6968
next unless TracePointSpec.target_thread?
7069
inspect ||= tp.inspect
7170
}
7271
line = __LINE__ + 2
73-
tp.enable do
72+
tracepoint.enable do
7473
[0, 1].max
7574
end
7675

0 commit comments

Comments
 (0)