ruby-changes:69977
From: Nobuyoshi <ko1@a...>
Date: Tue, 30 Nov 2021 08:49:58 +0900 (JST)
Subject: [ruby-changes:69977] ac8647bec1 (master): Fix `GC.total_time` example
https://git.ruby-lang.org/ruby.git/commit/?id=ac8647bec1 From ac8647bec12d5d3c0bc4b6a79d09a6a85d6628f1 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 30 Nov 2021 08:49:41 +0900 Subject: Fix `GC.total_time` example The result may increase actually or not, since GC can finish shorter than the timer granularity. --- spec/ruby/core/gc/total_time_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/ruby/core/gc/total_time_spec.rb b/spec/ruby/core/gc/total_time_spec.rb index 9b4f16e6033..fcc8f45a834 100644 --- a/spec/ruby/core/gc/total_time_spec.rb +++ b/spec/ruby/core/gc/total_time_spec.rb @@ -9,7 +9,7 @@ ruby_version_is "3.1" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/gc/total_time_spec.rb#L9 it "increases as collections are run" do time_before = GC.total_time GC.start - GC.total_time.should > time_before + GC.total_time.should >= time_before end end end -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/