summaryrefslogtreecommitdiff
path: root/test/ruby/test_readpartial.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_readpartial.rb')
-rw-r--r--test/ruby/test_readpartial.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/ruby/test_readpartial.rb b/test/ruby/test_readpartial.rb
index 2232068c1b..526425dc57 100644
--- a/test/ruby/test_readpartial.rb
+++ b/test/ruby/test_readpartial.rb
@@ -17,12 +17,11 @@ class TestReadPartial < Test::Unit::TestCase
make_pipe {|r, w|
yield r, w
}
+ return unless defined?(Fcntl::F_SETFL)
+ return unless defined?(Fcntl::F_GETFL)
+ return unless defined?(Fcntl::O_NONBLOCK)
make_pipe {|r, w|
- begin
- r.fcntl(Fcntl::F_SETFL, r.fcntl(Fcntl::F_GETFL) | Fcntl::O_NONBLOCK)
- rescue NotImplementedError
- break
- end
+ r.fcntl(Fcntl::F_SETFL, r.fcntl(Fcntl::F_GETFL) | Fcntl::O_NONBLOCK)
yield r, w
}
end