зеркало из https://github.com/github/ruby.git
test/logger/test_logdevice.rb: Close fds.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a2f9b00ad4
Коммит
2edc9ea5f8
|
@ -289,7 +289,8 @@ class TestLogDevice < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_shifting_size_not_rotate_too_much
|
||||
d(@filename).__send__(:add_log_header, @tempfile)
|
||||
logdev0 = d(@filename)
|
||||
logdev0.__send__(:add_log_header, @tempfile)
|
||||
header_size = @tempfile.size
|
||||
message = "*" * 99 + "\n"
|
||||
shift_size = header_size + message.size * 3 - 1
|
||||
|
@ -324,6 +325,8 @@ class TestLogDevice < Test::Unit::TestCase
|
|||
logdev2.close if logdev2
|
||||
end
|
||||
end
|
||||
ensure
|
||||
logdev0.close
|
||||
end unless /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
|
||||
def test_shifting_midnight
|
||||
|
|
Загрузка…
Ссылка в новой задаче