diff options
author | Antonio Terceiro <asa@terceiro.xyz> | 2019-11-25 21:25:53 -0300 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2019-12-05 13:28:34 +0900 |
commit | ed5d032ea33a465fd7152a236a4aca0ff5653bf3 (patch) | |
tree | 6798035b5d720d4971b5b3c07b0f57e0fa7c0c54 /lib/debug.rb | |
parent | 20031f8b74a224bed88bfd149d59d6176c4f58e2 (diff) | |
download | ruby-ed5d032ea33a465fd7152a236a4aca0ff5653bf3.tar.gz |
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.
Diffstat (limited to 'lib/debug.rb')
-rw-r--r-- | lib/debug.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |