1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2020-05-02 16:03:14 +02:00
parent a68ddf4287
commit c9213aa864
44 changed files with 904 additions and 20 deletions

View file

@ -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