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-03 12:28:29 +02:00
parent f646d20aae
commit 5aaa75e7c1
263 changed files with 921 additions and 921 deletions

View file

@ -51,16 +51,16 @@ end
@i.close
-> { @f.gets }.should_not raise_error(Exception)
@i.closed?.should == true
@f.closed?.should == false
@i.should.closed?
@f.should_not.closed?
end
it "allows closing the original IO without affecting the new one" do
@f.close
-> { @i.gets }.should_not raise_error(Exception)
@i.closed?.should == false
@f.closed?.should == true
@i.should_not.closed?
@f.should.closed?
end
it "raises IOError on closed stream" do
@ -71,7 +71,7 @@ end
@f.close_on_exec = true
dup = @f.dup
begin
dup.close_on_exec?.should == true
dup.should.close_on_exec?
ensure
dup.close
end
@ -79,7 +79,7 @@ end
@f.close_on_exec = false
dup = @f.dup
begin
dup.close_on_exec?.should == true
dup.should.close_on_exec?
ensure
dup.close
end