mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/logger.rb: check if the given logdevice object respond_to :write and
:close, not is_a? IO. duck duck. * test/logger/test_logger.rb: self IO.pipe reading/writing may be locked by the flood. use tempfile. * lib/wsdl/xmlSchema/data.rb: wrong constant reference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
14f9af6015
commit
523cd7be9c
4 changed files with 68 additions and 15 deletions
|
@ -322,7 +322,7 @@ private
|
|||
#
|
||||
def initialize(log = nil, opt = {})
|
||||
@dev = @filename = @shift_age = @shift_size = nil
|
||||
if log.is_a?(IO)
|
||||
if log.respond_to?(:write) and log.respond_to?(:close)
|
||||
@dev = log
|
||||
elsif log.is_a?(String)
|
||||
@dev = open_logfile(log)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue