summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/stat_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-05-02 16:03:14 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-05-02 16:03:14 +0200
commitc9213aa864fb8527388679c21f1ea8ce129e2f1a (patch)
treea6ef2403c73ef61a2aaddad6c0f8d9d09e4e6151 /spec/ruby/core/file/stat_spec.rb
parenta68ddf42879005905176bc38285906fe01707aff (diff)
Update to ruby/spec@d394dfd
Diffstat (limited to 'spec/ruby/core/file/stat_spec.rb')
-rw-r--r--spec/ruby/core/file/stat_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/core/file/stat_spec.rb b/spec/ruby/core/file/stat_spec.rb
index 76b0becbf0..275eae36d5 100644
--- a/spec/ruby/core/file/stat_spec.rb
+++ b/spec/ruby/core/file/stat_spec.rb
@@ -43,10 +43,11 @@ platform_is_not :windows do
end
it "returns an error when given missing non-ASCII path" do
- missing_path = "/missingfilepath\xE3E4".force_encoding("ASCII-8BIT")
+ missing_path = "/missingfilepath\xE3E4".b
-> {
File.stat(missing_path)
- }.should raise_error(Errno::ENOENT) { |e|
+ }.should raise_error(SystemCallError) { |e|
+ [Errno::ENOENT, Errno::EILSEQ].should include(e.class)
e.message.should include(missing_path)
}
end