From c5324d7ed6323fa86d083cf87847452c4aa4178a Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 31 May 2011 03:43:39 +0000 Subject: * test/ruby/test_io.rb (TestIO#test_open_mode): MUST release resources explicitly. fix problem of r31671 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/ruby/test_io.rb | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce3cbdf7f3..5fa7e5f23f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue May 31 12:40:49 2011 NAKAMURA Usaku + + * test/ruby/test_io.rb (TestIO#test_open_mode): MUST release resources + explicitly. fix problem of r31671 + Tue May 31 10:49:55 2011 NARUSE, Yui * vm_exec.c: remove conditions for clang 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 -- cgit v1.2.3