mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
IO#flush should raise an exception if it is closed.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user