From e03042ec19037512dfc0b274a611f7949a8a74b1 Mon Sep 17 00:00:00 2001 From: fl0l0u <16851037+fl0l0u@users.noreply.github.com> Date: Sat, 2 Sep 2017 18:26:50 +0200 Subject: 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}' --- mrbgems/mruby-print/src/print.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mrbgems/mruby-print/src/print.c b/mrbgems/mruby-print/src/print.c index fd8d15241..d0c522d24 100644 --- a/mrbgems/mruby-print/src/print.c +++ b/mrbgems/mruby-print/src/print.c @@ -33,6 +33,7 @@ printstr(mrb_state *mrb, mrb_value obj) } else #endif fwrite(RSTRING_PTR(obj), RSTRING_LEN(obj), 1, stdout); + fflush(stdout); } } -- cgit v1.2.3