mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/logger.rb(Logger#msg2str): no special treatment for the object
which responds to :to_str. * lib/logger.rb(LogDevice#initialize): remove type checking if the given object is a String. Kernel.open handles it correctly. * test/logger/test_logger.rb: follow above change (ArgumentError -> TypeError.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
96ff9b04c1
commit
77cb3aeba1
3 changed files with 29 additions and 30 deletions
|
@ -236,7 +236,7 @@ class TestLogDevice < Test::Unit::TestCase
|
|||
logdev = d(STDERR)
|
||||
assert_equal(STDERR, logdev.dev)
|
||||
assert_nil(logdev.filename)
|
||||
assert_raises(ArgumentError) do
|
||||
assert_raises(TypeError) do
|
||||
d(nil)
|
||||
end
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue