Permalink
Browse files

Merge pull request #1908 from tonysidaway/openbsd-process-exec

In OpenBSD exec raises EISDIR, not EACCES, when passed a directory
  • Loading branch information...
2 parents 2acbc7d + f718251 commit 43d0ed251c17d533edc8e4ed984e15df4d9914ae @dbussink dbussink committed Sep 17, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 spec/ruby/shared/process/exec.rb
@@ -16,8 +16,16 @@
lambda { @object.exec __FILE__ }.should raise_error(Errno::EACCES)
end
- it "raises Errno::EACCES when passed a directory" do
- lambda { @object.exec File.dirname(__FILE__) }.should raise_error(Errno::EACCES)
+ platform_is_not :openbsd do
+ it "raises Errno::EACCES when passed a directory" do
+ lambda { @object.exec File.dirname(__FILE__) }.should raise_error(Errno::EACCES)
+ end
+ end
+
+ platform_is :openbsd do
+ it "raises Errno::EISDIR when passed a directory" do
+ lambda { @object.exec File.dirname(__FILE__) }.should raise_error(Errno::EISDIR)
+ end
end
it "runs the specified command, replacing current process" do

0 comments on commit 43d0ed2

Please sign in to comment.