summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-30 13:35:47 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-30 13:35:47 +0000
commit437f09b4013a902508da5a3e181bb82f7ae15ea9 (patch)
treed44bcb7a75b8d8284cfd313a173cef6551b5a2d5 /lib
parentd962fc8a80c61d3f635bf651bd527aaf70ff6325 (diff)
Changed regexp for 'break' command.
Compare only basename of the target source file to check breakpoint. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/debug.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/debug.rb b/lib/debug.rb
index b938794682..08bc30a26d 100644
--- a/lib/debug.rb
+++ b/lib/debug.rb
@@ -297,12 +297,9 @@ class DEBUGGER__
stdout.print "Trace off.\n"
end
- when /^\s*b(?:reak)?\s+((?:.*?+:)?.+)$/
- pos = $1
- if pos.index(":")
- file, pos = pos.split(":")
- end
- file = File.basename(file)
+ when /^\s*b(?:reak)?\s+(?:(.+):)?(.+)$/
+ pos = $2
+ file = File.basename($1 || file)
if pos =~ /^\d+$/
pname = pos
pos = pos.to_i