add dummy IO#flush for better compatibility with CRuby.

This commit is contained in:
Tomoyuki Sahara
2014-02-12 16:33:34 +09:00
parent 40c52f58d0
commit daa65c15de
+5
View File
@@ -41,6 +41,11 @@ class IO
end
end
def flush
# mruby-io always writes immediately (no output buffer).
self
end
def write(string)
str = string.is_a?(String) ? string : string.to_s
return str.size unless str.size > 0