зеркало из https://github.com/github/ruby.git
Changed the regexp again to simplify code. See also [ruby-dev:16682].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
014c5da903
Коммит
76f963d077
11
lib/debug.rb
11
lib/debug.rb
|
@ -297,14 +297,9 @@ class Context
|
||||||
stdout.print "Trace off.\n"
|
stdout.print "Trace off.\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
when /^\s*b(?:reak)?\s+((?:.+:)?.+)$/
|
when /^\s*b(?:reak)?\s+(?:(.+):)?(.+)$/
|
||||||
pos = $1
|
pos = $2
|
||||||
if pos.index(":")
|
file = File.basename($1) if $1
|
||||||
pos = pos.split(":")
|
|
||||||
file = pos[0...-1].join(":")
|
|
||||||
pos = pos[-1]
|
|
||||||
end
|
|
||||||
file = File.basename(file)
|
|
||||||
if pos =~ /^\d+$/
|
if pos =~ /^\d+$/
|
||||||
pname = pos
|
pname = pos
|
||||||
pos = pos.to_i
|
pos = pos.to_i
|
||||||
|
|
Загрузка…
Ссылка в новой задаче