summaryrefslogtreecommitdiff
path: root/spec/ruby/core/io/read_nonblock_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/io/read_nonblock_spec.rb')
-rw-r--r--spec/ruby/core/io/read_nonblock_spec.rb24
1 files changed, 11 insertions, 13 deletions
diff --git a/spec/ruby/core/io/read_nonblock_spec.rb b/spec/ruby/core/io/read_nonblock_spec.rb
index cfa1e95e7f..e224707e38 100644
--- a/spec/ruby/core/io/read_nonblock_spec.rb
+++ b/spec/ruby/core/io/read_nonblock_spec.rb
@@ -22,23 +22,21 @@ describe "IO#read_nonblock" do
}
end
- ruby_version_is "2.3" do
- context "when exception option is set to false" do
- context "when there is no data" do
- it "returns :wait_readable" do
- @read.read_nonblock(5, exception: false).should == :wait_readable
- end
+ context "when exception option is set to false" do
+ context "when there is no data" do
+ it "returns :wait_readable" do
+ @read.read_nonblock(5, exception: false).should == :wait_readable
end
+ end
- context "when the end is reached" do
- it "returns nil" do
- @write << "hello"
- @write.close
+ context "when the end is reached" do
+ it "returns nil" do
+ @write << "hello"
+ @write.close
- @read.read_nonblock(5)
+ @read.read_nonblock(5)
- @read.read_nonblock(5, exception: false).should be_nil
- end
+ @read.read_nonblock(5, exception: false).should be_nil
end
end
end