lib: add 'close' in filter_stream
authorJean-Sebastien Gelinas <calestar@gmail.com>
Sat, 27 Jun 2009 01:35:09 +0000 (21:35 -0400)
committerJean Privat <jean@pryen.org>
Sat, 4 Jul 2009 00:56:00 +0000 (20:56 -0400)
Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

lib/filter_stream.nit

index 999f12c..4146345 100644 (file)
@@ -127,6 +127,15 @@ special FilterOStream
                end
        end
 
+       redef fun close
+       do
+               for i in _streams
+               do
+                       stream = i
+                       stream.close
+               end
+       end
+
        init with_streams(streams: Array[OStream])
        do
                _streams = streams