aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index e1ec389dc4..7256e6fc16 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1919,11 +1919,10 @@ End
end
def test_fcntl_dupfd
- Tempfile.new(self.class.name) do |f|
- f.open
- fd = f.fcntl(Fcntl::F_DUPFD, 500)
+ Tempfile.open(self.class.name) do |f|
+ fd = f.fcntl(Fcntl::F_DUPFD, 255)
begin
- assert_equal(fd, 500)
+ assert_equal(fd, 255)
ensure
IO.for_fd(fd).close
end