Skip to content

Commit c929e1c

Browse files
authored
Merge pull request #38 from kateinoigakukun/katei/wasi-compat
Stop using `IO::NULL` for feature detection
2 parents 2ff9b3c + d509398 commit c929e1c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/tempfile.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,7 @@ class << Tempfile
593593
end
594594
end
595595

596-
File.open(IO::NULL) do |f|
597-
File.new(f.fileno, autoclose: false, path: "").path
598-
rescue IOError
596+
if RUBY_VERSION < "3.2"
599597
module PathAttr # :nodoc:
600598
attr_reader :path
601599

0 commit comments

Comments
 (0)