diff options
| author | akr <akr@fsij.org> | 2024-06-01 15:11:19 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-01 15:11:19 +0900 |
| commit | 3ee83c73c38070d695537d4322ce4decb970a54a (patch) | |
| tree | 5473bb0b99515adfd2b62888e226e25d489c2a93 /spec/ruby/core/array/shuffle_spec.rb | |
| parent | 5308da5e1c53839b27cc4c0081bb965b46e0d052 (diff) | |
Tempfile.create(anonymous: true) implemented. (#10803)
The keyword argument `anonymous` is implemented for `Tempfile.create`
The default is `anonymous: false`.
The behavior is not changed as before.
The created temporary file is immediately removed if `anonymous: true` is specified.
So applications don't need to remove the file.
The actual storage of the file is reclaimed by the OS when the file is closed.
It uses `O_TMPFILE` for Linux 3.11 or later.
It creates an anonymous file from the beginning.
It uses FILE_SHARE_DELETE for Windows.
It makes it possible to remove the opened file.
[Feature #20497]
Diffstat (limited to 'spec/ruby/core/array/shuffle_spec.rb')
0 files changed, 0 insertions, 0 deletions
