diff --git a/lib/pry/commands/cat/abstract_formatter.rb b/lib/pry/commands/cat/abstract_formatter.rb index 661f036b..c5546476 100644 --- a/lib/pry/commands/cat/abstract_formatter.rb +++ b/lib/pry/commands/cat/abstract_formatter.rb @@ -8,7 +8,7 @@ class Pry def decorate(content) content.code_type = code_type content.between(*between_lines). - with_line_numbers(use_line_numbers?) + with_line_numbers(use_line_numbers?).highlighted end def code_type diff --git a/lib/pry/commands/cat/exception_formatter.rb b/lib/pry/commands/cat/exception_formatter.rb index f794c68d..af10e9d5 100644 --- a/lib/pry/commands/cat/exception_formatter.rb +++ b/lib/pry/commands/cat/exception_formatter.rb @@ -16,7 +16,7 @@ class Pry set_file_and_dir_locals(backtrace_file, _pry_, _pry_.current_context) code = decorate(Pry::Code.from_file(backtrace_file). between(*start_and_end_line_for_code_window). - with_marker(backtrace_line)).to_s + with_marker(backtrace_line)) "#{header}#{code}" end diff --git a/lib/pry/commands/cat/input_expression_formatter.rb b/lib/pry/commands/cat/input_expression_formatter.rb index 3650ede8..8791ac3f 100644 --- a/lib/pry/commands/cat/input_expression_formatter.rb +++ b/lib/pry/commands/cat/input_expression_formatter.rb @@ -20,7 +20,7 @@ class Pry content else - decorate(Pry::Code(selected_input_items.first)).to_s + decorate(Pry::Code(selected_input_items.first)) end end