Skip to content

Conversation

@koxya
Copy link
Contributor

@koxya koxya commented Dec 21, 2025

Ruby3.4より追加されたTemfile.createメソッドのanonymousオプションの説明を追加しました。
Rubyの実装PR:#10803

テンポラリファイルを作成し、それを表す File オブジェクトを生成して返します(Tempfileではありません)。
createはopenに似ていますが、finalizerによるファイルの自動unlinkを行いません。

ここも修正しようかと思ったのですが、どう表現するか悩んだのでそのままにしています。

ローカルでのスクリーンショット

スクリーンショット 2025-12-21 11 29 27

Ruby 3.4 added the `anonymous:` keyword to Tempfile.create, so update the reference
manual to reflect the new method signature and document the new parameter.

When `anonymous: true` is given, the temporary file is unlinked immediately after
creation to reduce the chance of being accessed via its pathname (while the
returned File can still be used). The default remains false, so existing behavior
is unchanged.

[#10803](ruby/ruby#10803)
@znz
Copy link
Member

znz commented Dec 25, 2025

ありがとうございます。

@znz znz merged commit e9ed383 into rurema:master Dec 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants