summaryrefslogtreecommitdiff
path: root/lib/logger.rb
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-29 07:27:57 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-29 07:27:57 +0000
commit523cd7be9c8284487317bb0286fc680acc45675c (patch)
treede9909c98366fdd6a713fb473aed5964e9282aef /lib/logger.rb
parent14f9af6015ce3a10f17f05db1ea63b416f9e3b93 (diff)
* 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
Diffstat (limited to 'lib/logger.rb')
-rw-r--r--lib/logger.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/logger.rb b/lib/logger.rb
index 04a106b..e8e163c 100644
--- a/lib/logger.rb
+++ b/lib/logger.rb
@@ -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)