summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/tempfile.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index af953a6c12..37df96f63a 100644
--- a/lib/tempfile.rb
+++ b/lib/tempfile.rb
@@ -593,9 +593,7 @@ private def create_with_filename(basename="", tmpdir=nil, mode: 0, **options)
end
end
-File.open(IO::NULL) do |f|
- File.new(f.fileno, autoclose: false, path: "").path
-rescue IOError
+if RUBY_VERSION < "3.2"
module PathAttr # :nodoc:
attr_reader :path