Sha256: b34d3b5d8ef9961262c38893ac59104b89948e6eb91bdd9a73e7aaf25e1ba62f
Contents?: true
Size: 694 Bytes
Versions: 11
Compression:
Stored size: 694 Bytes
Contents
require 'test/unit/failure' require 'test/unit/error' module Test module Unit BACKTRACE_INFO_RE = /.+:\d+:in `.+?'/ class Failure alias_method :original_long_display, :long_display def long_display extract_backtraces_re = /^ \[(#{BACKTRACE_INFO_RE}(?:\n #{BACKTRACE_INFO_RE})+)\]:$/ original_long_display.gsub(extract_backtraces_re) do |backtraces| $1.gsub(/^ (#{BACKTRACE_INFO_RE})/, '\1') + ':' end end end class Error alias_method :original_long_display, :long_display def long_display original_long_display.gsub(/^ (#{BACKTRACE_INFO_RE})/, '\1') end end end end
Version data entries
11 entries across 11 versions & 4 rubygems