diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-08-23 14:58:47 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-08-23 06:07:40 +0000 |
commit | 7812732e2c271732b96e285584ba84eb236c647a (patch) | |
tree | 4319ac662a87c662c3074a1d17ca9d5023cb3aaf /lib/tempfile.rb | |
parent | 52082d19e084c43457ce79c1e76f6f2707fac80e (diff) |
[ruby/tempfile] File.new(fileno, mode: mode, path: path) is provided from Ruby 3.2
https://github.com/ruby/tempfile/commit/67ce897727
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r-- | lib/tempfile.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index 40221d4f7c..bb05080cec 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -556,7 +556,7 @@ end # Related: Tempfile.new. # def Tempfile.create(basename="", tmpdir=nil, mode: 0, anonymous: false, **options, &block) - if anonymous + if anonymous && RUBY_VERSION >= '3.2' create_anonymous(basename, tmpdir, mode: mode, **options, &block) else create_with_filename(basename, tmpdir, mode: mode, **options, &block) |