summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2024-02-08 17:07:15 -0800
committerTakashi Kokubun <[email protected]>2024-02-08 17:08:23 -0800
commit76f0eec20f5a58b79177c3b6c601b6e361db6da9 (patch)
tree46ba292d31c12d912010b579d03af8d791ace595
parent2a57e6e6edbd848b5646a762e9351912c857706f (diff)
Fix a benchmark to avoid leaving a garbage file
-rw-r--r--benchmark/realpath.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/benchmark/realpath.yml b/benchmark/realpath.yml
index 90a029d5b9..6b6a4836b0 100644
--- a/benchmark/realpath.yml
+++ b/benchmark/realpath.yml
@@ -12,6 +12,9 @@ prelude: |
relative_dir = 'b/c'
absolute_dir = File.join(pwd, relative_dir)
file_dir = 'c'
+teardown: |
+ require 'fileutils'
+ FileUtils.rm_rf('b')
benchmark:
relative_nil: "f.realpath(relative, nil)"
absolute_nil: "f.realpath(absolute, nil)"