From ed5d032ea33a465fd7152a236a4aca0ff5653bf3 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 25 Nov 2019 21:25:53 -0300 Subject: [PATCH] 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. --- lib/debug.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/debug.rb b/lib/debug.rb index ce8b7d7fb9..6f519c6c77 100644 --- a/lib/debug.rb +++ b/lib/debug.rb @@ -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