You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

12 lines
306 B

require_relative 'ansi_colors'
# gather common definitions and functions
class AnsiCommon
def self.ansi_trace(trace)
match = trace.match(/(↳ )?(.*:\d+):in `(.*)'/)
return trace unless match
_, m2, m3 = match.captures
"#{m2} #{AnsiColors::BOLD}#{m3}#{AnsiColors::CLEAR}"
end
end