From 8675dd7b53c513f84750c6d6687065df1735df5c Mon Sep 17 00:00:00 2001 From: usa Date: Sat, 13 May 2017 15:23:38 +0000 Subject: The exception raised when exec/spawn unexecutable file on Windows is various It seems that depend on OS version or filesystem git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/rubyspec/core/process/spawn_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/rubyspec/core/process/spawn_spec.rb') diff --git a/spec/rubyspec/core/process/spawn_spec.rb b/spec/rubyspec/core/process/spawn_spec.rb index 31d14054ed..bd3d13f97e 100644 --- a/spec/rubyspec/core/process/spawn_spec.rb +++ b/spec/rubyspec/core/process/spawn_spec.rb @@ -575,8 +575,8 @@ describe "Process.spawn" do end platform_is :windows do - it "raises Errno::ENOEXEC when the file is not an executable file" do - lambda { Process.spawn __FILE__ }.should raise_error(Errno::ENOEXEC) + it "raises Errno::EACCES or Errno::ENOEXEC when the file is not an executable file" do + lambda { Process.spawn __FILE__ }.should raise_error(->(e){[Errno::EACCES, Errno::ENOEXEC].find{|exc| exc === e}}) end end end -- cgit v1.2.3