diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-05-02 16:03:14 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-05-02 16:03:14 +0200 |
commit | c9213aa864fb8527388679c21f1ea8ce129e2f1a (patch) | |
tree | a6ef2403c73ef61a2aaddad6c0f8d9d09e4e6151 /spec/ruby/core/file/stat_spec.rb | |
parent | a68ddf42879005905176bc38285906fe01707aff (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.rb | 5 |
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 |