summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_io.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 21a215d67a..8bd0a4b90c 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1918,6 +1918,17 @@ End
end
end
+ def test_fcntl_dupfd
+ Tempfile.open(self.class.name) do |f|
+ fd = f.fcntl(Fcntl::F_DUPFD, 500)
+ begin
+ assert_equal(fd, 500)
+ ensure
+ IO.for_fd(fd).close
+ end
+ end
+ end
+
def test_cross_thread_close_fd
skip "cross thread close causes hung-up if pipe." if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM
with_pipe do |r,w|