1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

spec: skip ruby_exe tests for wasi due to lack of subprocess

This commit is contained in:
Yuta Saito 2022-02-21 09:09:49 +00:00
parent 412991268f
commit fe2e5c13f9
Notes: git 2022-03-14 23:04:35 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -41,6 +41,10 @@ class PlatformGuard < SpecGuard
os?(:windows) os?(:windows)
end end
def self.wasi?
os?(:wasi)
end
def self.wsl? def self.wsl?
if defined?(@wsl_p) if defined?(@wsl_p)
@wsl_p @wsl_p

View file

@ -112,6 +112,8 @@ unless Object.const_defined?(:RUBY_EXE) and RUBY_EXE
end end
def ruby_exe(code = :not_given, opts = {}) def ruby_exe(code = :not_given, opts = {})
skip "WASI doesn't provide subprocess" if PlatformGuard.wasi?
if opts[:dir] if opts[:dir]
raise "ruby_exe(..., dir: dir) is no longer supported, use Dir.chdir" raise "ruby_exe(..., dir: dir) is no longer supported, use Dir.chdir"
end end