Skip to content

Commit adfd6bd

Browse files
committed
Add missing IO#close spec for Ruby >= 2.3
1 parent a57601b commit adfd6bd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/io/close_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
lambda { @io.close }.should raise_error(IOError)
3838
end
3939
end
40+
41+
ruby_version_is "2.3" do
42+
it "does not raise anything when self was already closed" do
43+
@io.close
44+
lambda { @io.close }.should_not raise_error
45+
end
46+
end
4047
end
4148

4249
describe "IO#close on an IO.popen stream" do

0 commit comments

Comments
 (0)