IO#flush should raise an exception if it is closed.

This commit is contained in:
Tomoyuki Sahara
2014-04-21 10:01:49 +09:00
parent 99c67749ff
commit e5f30f83ce
+1
View File
@@ -91,6 +91,7 @@ class IO
def flush
# mruby-io always writes immediately (no output buffer).
raise IOError, "closed stream" if self.closed?
self
end