summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-10 11:26:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-10 11:26:23 +0900
commit07e42e88d9f2b7756dde0a2377990ebf3c5e1973 (patch)
treecc7bcc7b1cbbc6090b48c58a9bcade3b3a4fe179
parent690282472960ff070883bd2151a0728ee5a01eea (diff)
Close created files [ci skip]
-rw-r--r--benchmark/require.yml6
-rw-r--r--benchmark/require_thread.yml6
2 files changed, 2 insertions, 10 deletions
diff --git a/benchmark/require.yml b/benchmark/require.yml
index 711d8e1..09f218c 100644
--- a/benchmark/require.yml
+++ b/benchmark/require.yml
@@ -15,11 +15,7 @@ prelude: |
FileUtils.mkdir_p(data_dir)
1.upto(num_files) do |i|
- f = File.open("#{data_dir}/c#{i}.rb", "w")
- f.puts <<-END
- class C#{i}
- end
- END
+ File.write("#{data_dir}/c#{i}.rb", "class C#{i}\n""end\n")
end
end
diff --git a/benchmark/require_thread.yml b/benchmark/require_thread.yml
index 87e0ba8..0c63257 100644
--- a/benchmark/require_thread.yml
+++ b/benchmark/require_thread.yml
@@ -15,11 +15,7 @@ prelude: |
FileUtils.mkdir_p(data_dir)
1.upto(num_files) do |i|
- f = File.open("#{data_dir}/c#{i}.rb", "w")
- f.puts <<-END
- class C#{i}
- end
- END
+ File.write("#{data_dir}/c#{i}.rb", "class C#{i}\n""end\n")
end
end