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

Handle empty backtrace from external filter #696

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/minitest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ def self.process_args args = [] # :nodoc:
end

def self.filter_backtrace bt # :nodoc:
backtrace_filter.filter bt
new_bt = backtrace_filter.filter bt
new_bt = bt.dup if new_bt.empty?
new_bt
end

##
Expand Down Expand Up @@ -818,7 +820,6 @@ def filter bt

new_bt = bt.take_while { |line| line !~ mt_re }
new_bt = bt.select { |line| line !~ mt_re } if new_bt.empty?
new_bt = bt.dup if new_bt.empty?

new_bt
end
Expand Down