summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAntonio Terceiro <asa@terceiro.xyz>2019-11-25 21:25:53 -0300
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-12-05 13:28:34 +0900
commited5d032ea33a465fd7152a236a4aca0ff5653bf3 (patch)
tree6798035b5d720d4971b5b3c07b0f57e0fa7c0c54 /lib
parent20031f8b74a224bed88bfd149d59d6176c4f58e2 (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2694
Diffstat (limited to 'lib')
-rw-r--r--lib/debug.rb2
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