mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (io_fwrite): always flush IO on tty, even without newlines.
[ruby-core:15107] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6d59907c0f
commit
d765a38bf5
2 changed files with 6 additions and 1 deletions
|
@ -63,6 +63,11 @@ Thu Jan 17 21:01:25 2008 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
* lib/date.rb, lib/date/format.rb: some trivial changes.
|
* lib/date.rb, lib/date/format.rb: some trivial changes.
|
||||||
|
|
||||||
|
Thu Jan 17 10:30:32 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (io_fwrite): always flush IO on tty, even without newlines.
|
||||||
|
[ruby-core:15107]
|
||||||
|
|
||||||
Wed Jan 16 22:45:27 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Jan 16 22:45:27 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* encoding.c (enc_register_at): make own copy. [ruby-dev:33136]
|
* encoding.c (enc_register_at): make own copy. [ruby-dev:33136]
|
||||||
|
|
2
io.c
2
io.c
|
@ -693,7 +693,7 @@ io_fwrite(VALUE str, rb_io_t *fptr)
|
||||||
}
|
}
|
||||||
if ((fptr->mode & FMODE_SYNC) ||
|
if ((fptr->mode & FMODE_SYNC) ||
|
||||||
(fptr->wbuf && fptr->wbuf_capa <= fptr->wbuf_len + len) ||
|
(fptr->wbuf && fptr->wbuf_capa <= fptr->wbuf_len + len) ||
|
||||||
((fptr->mode & FMODE_TTY) && memchr(RSTRING_PTR(str)+offset, '\n', len))) {
|
(fptr->mode & FMODE_TTY)) {
|
||||||
/* xxx: use writev to avoid double write if available */
|
/* xxx: use writev to avoid double write if available */
|
||||||
if (fptr->wbuf_len && fptr->wbuf_len+len <= fptr->wbuf_capa) {
|
if (fptr->wbuf_len && fptr->wbuf_len+len <= fptr->wbuf_capa) {
|
||||||
if (fptr->wbuf_capa < fptr->wbuf_off+fptr->wbuf_len+len) {
|
if (fptr->wbuf_capa < fptr->wbuf_off+fptr->wbuf_len+len) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue