diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index f91922796d..73cef715e6 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1854,10 +1854,14 @@ End feature4742 = "[ruby-core:36338]" mkcdtmpdir do - refute_nil(File.open('symbolic', 'w')) - refute_nil(File.open('numeric', File::WRONLY|File::TRUNC|File::CREAT)) - refute_nil(File.open('hash-symbolic', :mode => 'w')) - refute_nil(File.open('hash-numeric', :mode => File::WRONLY|File::TRUNC|File::CREAT), feature4742) + refute_nil(f = File.open('symbolic', 'w')) + f.close + refute_nil(f = File.open('numeric', File::WRONLY|File::TRUNC|File::CREAT)) + f.close + refute_nil(f = File.open('hash-symbolic', :mode => 'w')) + f.close + refute_nil(f = File.open('hash-numeric', :mode => File::WRONLY|File::TRUNC|File::CREAT), feature4742) + f.close end end |