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

ruby-changes:49952

From: nobu <ko1@a...>
Date: Sat, 27 Jan 2018 15:11:30 +0900 (JST)
Subject: [ruby-changes:49952] nobu:r62070 (trunk): vcs.rb: prepend DebugSystem to VCS

nobu	2018-01-27 15:11:23 +0900 (Sat, 27 Jan 2018)

  New Revision: 62070

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

  Log:
    vcs.rb: prepend DebugSystem to VCS

  Modified files:
    trunk/tool/vcs.rb
Index: tool/vcs.rb
===================================================================
--- tool/vcs.rb	(revision 62069)
+++ tool/vcs.rb	(revision 62070)
@@ -93,7 +93,10 @@ else https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L93
   module DebugSystem
     def system(*args, exception: true, **opts)
       STDERR.puts [*args, **opts].inspect if $DEBUG
-      ret = super(*args, **opts, exception: exception)
+      if RUBY_VERSION >= "2.6"
+        opts[:exception] = exception
+      end
+      ret = super(*args, **opts)
       raise "Command failed with status (#$?): #{args[0]}" if exception and !ret
       ret
     end
@@ -104,6 +107,7 @@ else https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L107
 end
 
 class VCS
+  prepend(DebugSystem) if defined?(DebugSystem)
   class NotFoundError < RuntimeError; end
 
   @@dirs = []

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

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