1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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:
akr 2014-05-29 13:12:38 +00:00
parent a2f9b00ad4
commit 2edc9ea5f8

View file

@ -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