mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Close created files [ci skip]
This commit is contained in:
parent
6902824729
commit
07e42e88d9
2 changed files with 2 additions and 10 deletions
|
@ -15,11 +15,7 @@ prelude: |
|
||||||
FileUtils.mkdir_p(data_dir)
|
FileUtils.mkdir_p(data_dir)
|
||||||
|
|
||||||
1.upto(num_files) do |i|
|
1.upto(num_files) do |i|
|
||||||
f = File.open("#{data_dir}/c#{i}.rb", "w")
|
File.write("#{data_dir}/c#{i}.rb", "class C#{i}\n""end\n")
|
||||||
f.puts <<-END
|
|
||||||
class C#{i}
|
|
||||||
end
|
|
||||||
END
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,7 @@ prelude: |
|
||||||
FileUtils.mkdir_p(data_dir)
|
FileUtils.mkdir_p(data_dir)
|
||||||
|
|
||||||
1.upto(num_files) do |i|
|
1.upto(num_files) do |i|
|
||||||
f = File.open("#{data_dir}/c#{i}.rb", "w")
|
File.write("#{data_dir}/c#{i}.rb", "class C#{i}\n""end\n")
|
||||||
f.puts <<-END
|
|
||||||
class C#{i}
|
|
||||||
end
|
|
||||||
END
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue