summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-11-30 08:49:41 +0900
committerGitHub <noreply@github.com>2021-11-30 08:49:41 +0900
commitac8647bec12d5d3c0bc4b6a79d09a6a85d6628f1 (patch)
tree00e6092e84c4906af42edaea01a0ef3f07d97d01
parentaf59d35570d398bd590bebd11602bcb039454c0d (diff)
Fix `GC.total_time` example
The result may increase actually or not, since GC can finish shorter than the timer granularity.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5193 Merged-By: nobu <nobu@ruby-lang.org>
-rw-r--r--spec/ruby/core/gc/total_time_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/core/gc/total_time_spec.rb b/spec/ruby/core/gc/total_time_spec.rb
index 9b4f16e603..fcc8f45a83 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
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