Skip to content

Commit

Permalink
Merge pull request #38 from kateinoigakukun/katei/wasi-compat
Browse files Browse the repository at this point in the history
Stop using `IO::NULL` for feature detection
  • Loading branch information
hsbt authored Nov 18, 2024
2 parents 2ff9b3c + d509398 commit c929e1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/tempfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c929e1c

Please sign in to comment.