[ruby/logger] Use __FILE__ for wasm

`/dev/null` is not available on wasm.

https://github.com/ruby/logger/commit/4be05c2208
This commit is contained in:
Nobuyoshi Nakada 2024-12-19 12:36:43 +09:00 committed by Hiroshi SHIBATA
parent 68e2022b5b
commit d16b043cdd

View File

@ -223,7 +223,7 @@ class Logger
end
end
File.open(IO::NULL) do |f|
File.open(__FILE__) do |f|
File.new(f.fileno, autoclose: false, path: "").path
rescue IOError
module PathAttr # :nodoc: