From 08702ce1d8b2030b42520ce84d4d1bb3217c0095 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 14 Dec 2013 21:04:45 +0900 Subject: [PATCH] Make file_and_line method to be public (lib/pry/commands/cat/file_formatter.rb) --- lib/pry/commands/cat/file_formatter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pry/commands/cat/file_formatter.rb b/lib/pry/commands/cat/file_formatter.rb index ec84968a..a03655fb 100644 --- a/lib/pry/commands/cat/file_formatter.rb +++ b/lib/pry/commands/cat/file_formatter.rb @@ -19,14 +19,14 @@ class Pry decorate(@code_from_file) end - private - def file_and_line file_name, line_num = file_with_embedded_line.split(/:(?!\/|\\)/) [file_name, line_num ? line_num.to_i : nil] end + private + def file_name file_and_line.first end