mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Fix some file paths break in Windows (#708). file_and_line methods in lib/pry/commands/cat/file_formatter.rb split file path with ':'. So if file path is 'c:/path/to/file', this method works incorrectly. This fix replace ':' to regexp
This commit is contained in:
parent
345641998a
commit
4b284f9aea
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ class Pry
|
||||||
private
|
private
|
||||||
|
|
||||||
def file_and_line
|
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]
|
[file_name, line_num ? line_num.to_i : nil]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue