diff --git a/lib/tempfile.rb b/lib/tempfile.rb index b0875a0..9a14449 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -593,9 +593,7 @@ class << Tempfile 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