stdlib/streams: Streamable now working on any Text type instead of just String.
[nit.git] / lib / filter_stream.nit
index 4146345..a32c288 100644 (file)
@@ -12,9 +12,9 @@
 # another product.
 
 class FilterIStream
-special IStream
+       super IStream
        # Filter readed elements
-       readable var _stream: nullable IStream
+       readable var _stream: nullable IStream = null
 
        redef fun eof: Bool
        do
@@ -29,9 +29,9 @@ special IStream
 end
 
 class FilterOStream
-special OStream
+       super OStream
        # Filter outputed elements
-       readable var _stream: nullable OStream
+       readable var _stream: nullable OStream = null
 
        # Can the stream be used to write
        redef fun is_writable: Bool
@@ -47,7 +47,7 @@ special OStream
 end
 
 class StreamCat
-special FilterIStream
+       super FilterIStream
        var _streams: Iterator[IStream]
 
        redef fun eof: Bool
@@ -98,7 +98,7 @@ special FilterIStream
 end
 
 class StreamDemux
-special FilterOStream
+       super FilterOStream
        var _streams: Array[OStream]
 
        redef fun is_writable: Bool
@@ -116,7 +116,7 @@ special FilterOStream
                end
        end
 
-       redef fun write(s: String)
+       redef fun write(s: Text)
        do
                for i in _streams
                do