debug.rb: expand filenames in breakpoints

When debugging some local code, specifying a breakpoint to a local
filename does not work, i.e.

    break lib/foo.rb:10

Expanding the filename makes it work. FWIW byebug has the same behavior.
This commit is contained in:
Antonio Terceiro 2019-11-25 21:25:53 -03:00 коммит произвёл SHIBATA Hiroshi
Родитель 20031f8b74
Коммит ed5d032ea3
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -427,7 +427,7 @@ class DEBUGGER__
pos = $2
if $1
klass = debug_silent_eval($1, binding)
file = $1
file = File.expand_path($1)
end
if pos =~ /^\d+$/
pname = pos