From 23ff1abc9cfb81bb3533c6a362b35baa25356a4c Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 11 Dec 2018 10:55:07 +0000 Subject: [PATCH] Same as r66334 add Errno::EISDIR git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/core/file/open_spec.rb | 2 +- spec/ruby/core/file/shared/path.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/ruby/core/file/open_spec.rb b/spec/ruby/core/file/open_spec.rb index a22a856dd9..c6a0b68233 100644 --- a/spec/ruby/core/file/open_spec.rb +++ b/spec/ruby/core/file/open_spec.rb @@ -538,7 +538,7 @@ describe "File.open" do io.read.should == "ruby" Dir["#{dir}/*"].should == [] end - rescue Errno::EOPNOTSUPP, Errno::EINVAL + rescue Errno::EOPNOTSUPP, Errno::EINVAL, Errno::EISDIR # EOPNOTSUPP: no support from the filesystem # EINVAL: presumably bug in glibc 1.should == 1 diff --git a/spec/ruby/core/file/shared/path.rb b/spec/ruby/core/file/shared/path.rb index 772272909c..503e485f1e 100644 --- a/spec/ruby/core/file/shared/path.rb +++ b/spec/ruby/core/file/shared/path.rb @@ -69,7 +69,7 @@ describe :file_path, shared: true do File.open(@dir, File::RDWR | File::TMPFILE) do |f| -> { f.send(@method) }.should raise_error(IOError) end - rescue Errno::EOPNOTSUPP, Errno::EINVAL + rescue Errno::EOPNOTSUPP, Errno::EINVAL, Errno::EISDIR # EOPNOTSUPP: no support from the filesystem 1.should == 1 end