mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -33,6 +33,7 @@ printstr(mrb_state *mrb, mrb_value obj)
|
||||
} else
|
||||
#endif
|
||||
fwrite(RSTRING_PTR(obj), RSTRING_LEN(obj), 1, stdout);
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user