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

ruby-changes:60797

From: Nobuyoshi <ko1@a...>
Date: Fri, 17 Apr 2020 00:52:50 +0900 (JST)
Subject: [ruby-changes:60797] 3cca0d1958 (master): core_assertions.rb: fixed fd leak at timeout

https://git.ruby-lang.org/ruby.git/commit/?id=3cca0d1958

From 3cca0d1958a53a18b824af24801b9cbfa04691df Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 16 Apr 2020 23:45:02 +0900
Subject: core_assertions.rb: fixed fd leak at timeout


diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb
index e5f741f..127ff49 100644
--- a/tool/lib/test/unit/core_assertions.rb
+++ b/tool/lib/test/unit/core_assertions.rb
@@ -291,6 +291,7 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/core_assertions.rb#L291
         args = args.dup
         args.insert((Hash === args.first ? 1 : 0), "-w", "--disable=gems", *$:.map {|l| "-I#{l}"})
         stdout, stderr, status = EnvUtil.invoke_ruby(args, src, capture_stdout, true, **opt)
+      ensure
         if res_c
           res_c.close
           res = res_p.read
@@ -298,6 +299,7 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/core_assertions.rb#L299
         else
           res = stdout
         end
+        raise if $!
         abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig))
         assert(!abort, FailDesc[status, nil, stderr])
         self._assertions += res[/^assertions=(\d+)/, 1].to_i
-- 
cgit v0.10.2


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

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