class Minitest::BacktraceFilter

:nodoc:

def filter bt

:nodoc:
def filter bt
  return ["No backtrace"] unless bt
  return bt.dup if $DEBUG
  mt_re = %r%lib/minitest%
  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