Skip to content

Commit 774c1d5

Browse files
committed
Shush the backtrace_locations, too
1 parent 046d50a commit 774c1d5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/spring/application.rb

+8-2
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ def shush_backtraces
319319
ensure
320320
if $!
321321
lib = File.expand_path("..", __FILE__)
322-
$!.backtrace.reject! { |line| line.start_with?(lib) } unless $!.backtrace.frozen?
322+
unless $!.backtrace.frozen?
323+
$!.backtrace.reject! { |line| line.start_with?(lib) }
324+
$!.backtrace_locations.reject! { |line| line.path.start_with?(lib) }
325+
end
323326
end
324327
end
325328
end
@@ -330,7 +333,10 @@ def shush_backtraces
330333
ensure
331334
if $!
332335
lib = File.expand_path("..", __FILE__)
333-
$!.backtrace.reject! { |line| line.start_with?(lib) } unless $!.backtrace.frozen?
336+
unless $!.backtrace.frozen?
337+
$!.backtrace.reject! { |line| line.start_with?(lib) }
338+
$!.backtrace_locations.reject! { |line| line.path.start_with?(lib) }
339+
end
334340
end
335341
end
336342
end

0 commit comments

Comments
 (0)