mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 6 additions and 2 deletions
|
@ -131,7 +131,7 @@ end
|
|||
ENV.update env
|
||||
|
||||
if debugger or ENV['RUNRUBY_USE_GDB'] == 'true'
|
||||
if debugger == :gdb
|
||||
if debugger == :gdb or !debugger
|
||||
debugger = %w'gdb'
|
||||
if File.exist?(gdb = 'run.gdb') or
|
||||
File.exist?(gdb = File.join(abs_archdir, 'run.gdb'))
|
||||
|
@ -139,7 +139,11 @@ if debugger or ENV['RUNRUBY_USE_GDB'] == 'true'
|
|||
end
|
||||
debugger << '--args'
|
||||
end
|
||||
precommand[precommand.index(:debugger), 1] = debugger
|
||||
if idx = precommand.index(:debugger)
|
||||
precommand[idx, 1] = debugger
|
||||
else
|
||||
precommand.concat(debugger)
|
||||
end
|
||||
end
|
||||
|
||||
cmd = [runner || ruby]
|
||||
|
|
Loading…
Reference in a new issue