diff options
| author | fl0l0u <[email protected]> | 2017-09-02 18:26:50 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-09-02 18:26:50 +0200 |
| commit | e03042ec19037512dfc0b274a611f7949a8a74b1 (patch) | |
| tree | 271e25bd4e1ae6a29fcf2ef273aa7835fa2616e2 | |
| parent | 476af3c64726fed823e4a1fdc316f0780f340246 (diff) | |
| download | mruby-e03042ec19037512dfc0b274a611f7949a8a74b1.tar.gz mruby-e03042ec19037512dfc0b274a611f7949a8a74b1.zip | |
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}'
| -rw-r--r-- | mrbgems/mruby-print/src/print.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } } |
