[前][次][番号順一覧][スレッド一覧]

ruby-changes:48583

From: nobu <ko1@a...>
Date: Tue, 7 Nov 2017 20:21:15 +0900 (JST)
Subject: [ruby-changes:48583] nobu:r60698 (trunk): tool/runruby.rb: fix RUNRUBY_USE_GDB case

nobu	2017-11-07 20:21:09 +0900 (Tue, 07 Nov 2017)

  New Revision: 60698

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60698

  Log:
    tool/runruby.rb: fix RUNRUBY_USE_GDB case

  Modified files:
    trunk/tool/runruby.rb
Index: tool/runruby.rb
===================================================================
--- tool/runruby.rb	(revision 60697)
+++ tool/runruby.rb	(revision 60698)
@@ -131,7 +131,7 @@ end https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L131
 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'] == https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L139
     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]

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]