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

* test/openssl/test_engine.rb: use IO#reopen to restore stderr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-11-24 11:07:50 +00:00
parent bee4e843ce
commit d7b7f56c8c
3 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Nov 24 20:02:40 2011 Tanaka Akira <akr@fsij.org>
* test/openssl/test_engine.rb: use IO#reopen to restore stderr.
Thu Nov 24 19:59:56 2011 Tanaka Akira <akr@fsij.org>
* io.c (rb_io_reopen): re-initialize buffereing mode for stdout and

View file

@ -53,7 +53,10 @@ class OpenSSL::TestEngine < Test::Unit::TestCase
assert_equal(data, decrypted)
cleanup
ensure
$stderr = err_back if err_back
if err_back
$stderr.reopen(err_back)
err_back.close
end
end
private

View file

@ -2157,4 +2157,13 @@ End
}
}
end
def test_std_fileno
assert_equal(0, STDIN.fileno)
assert_equal(1, STDOUT.fileno)
assert_equal(2, STDERR.fileno)
assert_equal(0, $stdin.fileno)
assert_equal(1, $stdout.fileno)
assert_equal(2, $stderr.fileno)
end
end