diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 27a4760b98..d9d93444f3 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -1290,7 +1290,7 @@ class TestFileExhaustive < Test::Unit::TestCase end; assert_separately(["-rtimeout", "-", regular_file], "#{<<~begin}#{<<~"end;"}") begin - open(ARGV[0], "r") do |f| + open(ARGV[0], "r+") do |f| assert_raise(Timeout::Error) do Timeout.timeout(0.1) do f.flock(File::LOCK_EX)