diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-22 23:07:26 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-22 23:07:26 +0900 |
commit | e340eb2106544dffe909104df1ff61236f70f280 (patch) | |
tree | de9ff8ae944497eb10c44d16961f1882f385c812 /tool/lib | |
parent | 27916db08cd446214b4d84b5aca7fcdf3147e2ef (diff) | |
download | ruby-e340eb2106544dffe909104df1ff61236f70f280.tar.gz |
core_assertions.rb: Fix backward compatibility with pre 2.7
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/core_assertions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index 39094fb66c..52c2c6b388 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -746,7 +746,7 @@ eom def assert_linear_performance(seq, rehearsal: nil, pre: ->(n) {n}) first = seq.first *arg = pre.call(first) - times = (0..(rehearsal || (2 * first))).filter_map do + times = (0..(rehearsal || (2 * first))).map do st = Process.clock_gettime(Process::CLOCK_MONOTONIC) yield(*arg) t = (Process.clock_gettime(Process::CLOCK_MONOTONIC) - st) |