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

ruby-changes:67919

From: Hiroshi <ko1@a...>
Date: Sat, 11 Sep 2021 11:23:08 +0900 (JST)
Subject: [ruby-changes:67919] b178929469 (master): Fixed uninitialized constant Test::Unit::Assertions::MIN_MEASURABLE.

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

From b1789294695432557fbb79d5ba522c2eaa5b968d Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Sat, 11 Sep 2021 11:21:37 +0900
Subject: Fixed uninitialized constant Test::Unit::Assertions::MIN_MEASURABLE.

  I'm not sure why it's failed under the chkbuild and rubyci.

  http://rubyci.s3.amazonaws.com/arch/ruby-master/log/20210911T000007Z.fail.html.gz
---
 tool/lib/test/unit/assertions.rb | 5 +++++
 tool/lib/test/unit/testcase.rb   | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb
index 3352474..1368312 100644
--- a/tool/lib/test/unit/assertions.rb
+++ b/tool/lib/test/unit/assertions.rb
@@ -842,6 +842,11 @@ EOT https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/assertions.rb#L842
         result
       end
 
+      # kernel resolution can limit the minimum time we can measure
+      # [ruby-core:81540]
+      MIN_HZ = /mswin|mingw/ =~ RUBY_PLATFORM ? 67 : 100
+      MIN_MEASURABLE = 1.0 / MIN_HZ
+
       def assert_cpu_usage_low(msg = nil, pct: 0.05, wait: 1.0, stop: nil)
         require 'benchmark'
 
diff --git a/tool/lib/test/unit/testcase.rb b/tool/lib/test/unit/testcase.rb
index 19d90c5..6753d22 100644
--- a/tool/lib/test/unit/testcase.rb
+++ b/tool/lib/test/unit/testcase.rb
@@ -156,11 +156,6 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/testcase.rb#L156
       PASSTHROUGH_EXCEPTIONS = [NoMemoryError, SignalException,
                                 Interrupt, SystemExit] # :nodoc:
 
-      # kernel resolution can limit the minimum time we can measure
-      # [ruby-core:81540]
-      MIN_HZ = windows? ? 67 : 100
-      MIN_MEASURABLE = 1.0 / MIN_HZ
-
       ##
       # Runs the tests reporting the status to +runner+
 
-- 
cgit v1.1


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

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