diff --git a/lib/pry/commands/cat/file_formatter.rb b/lib/pry/commands/cat/file_formatter.rb index 03226dfb..ec84968a 100644 --- a/lib/pry/commands/cat/file_formatter.rb +++ b/lib/pry/commands/cat/file_formatter.rb @@ -22,7 +22,7 @@ class Pry private def file_and_line - file_name, line_num = file_with_embedded_line.split(':') + file_name, line_num = file_with_embedded_line.split(/:(?!\/|\\)/) [file_name, line_num ? line_num.to_i : nil] end