lib/logging/appenders/string_io.rb in logging-0.9.8 vs lib/logging/appenders/string_io.rb in logging-1.0.0
- old
+ new
@@ -1,8 +1,6 @@
-require 'stringio'
-
module Logging::Appenders
# This class provides an Appender that can write to a StringIO instance.
# This is very useful for testing log message output.
#
@@ -18,11 +16,11 @@
# StringIO instance.
#
def initialize( name, opts = {} )
@sio = StringIO.new
@sio.extend IoToS
+ @pos = 0
super(name, @sio, opts)
- clear
end
# Clears the internal StringIO instance. All log messages are removed
# from the buffer.
#