tool/runruby.rb: fix RUNRUBY_USE_GDB case
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a95f4ace39
commit
c2a08ef876
@ -131,7 +131,7 @@ end
|
|||||||
ENV.update env
|
ENV.update env
|
||||||
|
|
||||||
if debugger or ENV['RUNRUBY_USE_GDB'] == 'true'
|
if debugger or ENV['RUNRUBY_USE_GDB'] == 'true'
|
||||||
if debugger == :gdb
|
if debugger == :gdb or !debugger
|
||||||
debugger = %w'gdb'
|
debugger = %w'gdb'
|
||||||
if File.exist?(gdb = 'run.gdb') or
|
if File.exist?(gdb = 'run.gdb') or
|
||||||
File.exist?(gdb = File.join(abs_archdir, 'run.gdb'))
|
File.exist?(gdb = File.join(abs_archdir, 'run.gdb'))
|
||||||
@ -139,7 +139,11 @@ if debugger or ENV['RUNRUBY_USE_GDB'] == 'true'
|
|||||||
end
|
end
|
||||||
debugger << '--args'
|
debugger << '--args'
|
||||||
end
|
end
|
||||||
precommand[precommand.index(:debugger), 1] = debugger
|
if idx = precommand.index(:debugger)
|
||||||
|
precommand[idx, 1] = debugger
|
||||||
|
else
|
||||||
|
precommand.concat(debugger)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
cmd = [runner || ruby]
|
cmd = [runner || ruby]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user