diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-07 11:21:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-07 11:21:09 +0000 |
commit | c2a08ef876e3a8caa95d29eb9683ec63d77ebf1c (patch) | |
tree | c3b466e9b947ce202df20a29f0d4b7cf96fc13e3 /tool | |
parent | a95f4ace397d145d490de428c864ec55afda18f4 (diff) | |
download | ruby-c2a08ef876e3a8caa95d29eb9683ec63d77ebf1c.tar.gz |
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
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/runruby.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tool/runruby.rb b/tool/runruby.rb index 662c0aef35..a5aa3e7d8d 100755 --- a/tool/runruby.rb +++ b/tool/runruby.rb @@ -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] |