summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-29 22:48:53 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-29 22:48:53 +0000
commite95144436f8dccb3a30b5a1d59f8df8e52afb994 (patch)
treeaef524394d97e12470b5faf288abcb337d98d75d /io.c
parent5b66b692dde7cf64e06216aefdb76748d5f33377 (diff)
merges r31237 from trunk into ruby_1_9_2.
-- * io.c (rb_io_syswrite): While local FS writes are usually buffered, the buffers can be full or the file opened with O_SYNC. IO#syswrite can also be used on blocking IOs (pipe/socket) just like IO#write. The patch is written by Eric Wong. [ruby-core:35554] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index bd5494696b..c62ae6ab6b 100644
--- a/io.c
+++ b/io.c
@@ -3854,7 +3854,7 @@ rb_io_syswrite(VALUE io, VALUE str)
rb_io_check_closed(fptr);
}
- n = write(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str));
+ n = rb_write_internal(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str));
if (n == -1) rb_sys_fail_path(fptr->pathv);