ruby-changes:59077
From: Antonio <ko1@a...>
Date: Thu, 5 Dec 2019 13:28:52 +0900 (JST)
Subject: [ruby-changes:59077] ed5d032ea3 (master): debug.rb: expand filenames in breakpoints
https://git.ruby-lang.org/ruby.git/commit/?id=ed5d032ea3 From ed5d032ea33a465fd7152a236a4aca0ff5653bf3 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro <asa@t...> Date: Mon, 25 Nov 2019 21:25:53 -0300 Subject: 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. diff --git a/lib/debug.rb b/lib/debug.rb index ce8b7d7..6f519c6 100644 --- a/lib/debug.rb +++ b/lib/debug.rb @@ -427,7 +427,7 @@ class DEBUGGER__ https://github.com/ruby/ruby/blob/trunk/lib/debug.rb#L427 pos = $2 if $1 klass = debug_silent_eval($1, binding) - file = $1 + file = File.expand_path($1) end if pos =~ /^\d+$/ pname = pos -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/