ruby-changes:22080
From: usa <ko1@a...>
Date: Mon, 26 Dec 2011 13:21:29 +0900 (JST)
Subject: [ruby-changes:22080] usa:r34129 (trunk): * test/ruby/test_io.rb (TestIO#test_autoclose): Tempfile.new doesn't
usa 2011-12-26 13:21:15 +0900 (Mon, 26 Dec 2011) New Revision: 34129 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34129 Log: * test/ruby/test_io.rb (TestIO#test_autoclose): Tempfile.new doesn't accept the block argument. Modified files: trunk/ChangeLog trunk/test/ruby/test_io.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 34128) +++ ChangeLog (revision 34129) @@ -1,3 +1,8 @@ +Mon Dec 26 13:07:08 2011 NAKAMURA Usaku <usa@r...> + + * test/ruby/test_io.rb (TestIO#test_autoclose): Tempfile.new doesn't + accept the block argument. + Mon Dec 26 13:06:52 2011 Shota Fukumori <sorah@t...> * lib/test/unit.rb: Avoid zombie processes on "--separate" option Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 34128) +++ test/ruby/test_io.rb (revision 34129) @@ -1423,32 +1423,29 @@ feature2250 = '[ruby-core:26222]' pre = 'ft2250' - Tempfile.new(pre) do |t| - f = IO.for_fd(t.fileno) - assert_equal(true, f.autoclose?) - f.autoclose = false - assert_equal(false, f.autoclose?) - f.close - assert_nothing_raised(Errno::EBADF) {t.close} + t = Tempfile.new(pre) + f = IO.for_fd(t.fileno) + assert_equal(true, f.autoclose?) + f.autoclose = false + assert_equal(false, f.autoclose?) + f.close + assert_nothing_raised(Errno::EBADF) {t.close} - t.open - f = IO.for_fd(t.fileno, autoclose: false) - assert_equal(false, f.autoclose?) - f.autoclose = true - assert_equal(true, f.autoclose?) - f.close - assert_raise(Errno::EBADF) {t.close} - end + t.open + f = IO.for_fd(t.fileno, autoclose: false) + assert_equal(false, f.autoclose?) + f.autoclose = true + assert_equal(true, f.autoclose?) + f.close + assert_raise(Errno::EBADF) {t.close} - Tempfile.new(pre) do |t| - try_fdopen(t.fileno) - assert_raise(Errno::EBADF) {t.close} - end + t = Tempfile.new(pre) + try_fdopen(t.fileno) + assert_raise(Errno::EBADF) {t.close} - Tempfile.new(pre) do |t| - try_fdopen(f.fileno, false) - assert_nothing_raised(Errno::EBADF) {t.close} - end + t = Tempfile.new(pre) + try_fdopen(t.fileno, false) + assert_nothing_raised(Errno::EBADF) {t.close} end def test_open_redirect -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/