Update print.c

Strings not containing a newline are not printed synchronously
ex. bin/mruby -e '["a", "b", "c", "\n", "d", "e", "f", "\n"].each {|e| print e ; usleep 200000}'
This commit is contained in:
fl0l0u
2017-09-02 18:26:50 +02:00
committed by GitHub
parent 476af3c647
commit e03042ec19
+1
View File
@@ -33,6 +33,7 @@ printstr(mrb_state *mrb, mrb_value obj)
} else
#endif
fwrite(RSTRING_PTR(obj), RSTRING_LEN(obj), 1, stdout);
fflush(stdout);
}
}