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

ruby-changes:49991

From: naruse <ko1@a...>
Date: Tue, 30 Jan 2018 16:34:11 +0900 (JST)
Subject: [ruby-changes:49991] naruse:r62109 (trunk): support ruby 1.9.3

naruse	2018-01-30 16:34:06 +0900 (Tue, 30 Jan 2018)

  New Revision: 62109

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

  Log:
    support ruby 1.9.3

  Modified files:
    trunk/tool/vcs.rb
Index: tool/vcs.rb
===================================================================
--- tool/vcs.rb	(revision 62108)
+++ tool/vcs.rb	(revision 62109)
@@ -91,14 +91,20 @@ else https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L91
   end
   using DebugPOpen
   module DebugSystem
-    def system(*args, **opts)
-      STDERR.puts [*args, **opts].inspect if $DEBUG
+    def system(*args)
+      STDERR.puts args.inspect if $DEBUG
+      exception = false
+      opts = Hash.try_convert(args[-1])
       if RUBY_VERSION >= "2.6"
+        unless opts
+          opts = {}
+          args << opts
+        end
         exception = opts.fetch(:exception) {opts[:exception] = true}
-      else
+      elsif opts
         exception = opts.delete(:exception) {true}
       end
-      ret = super(*args, **opts)
+      ret = super(*args)
       raise "Command failed with status (#$?): #{args[0]}" if exception and !ret
       ret
     end

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

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