summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--io.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 906434145f..6aaef9309a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Mon Apr 4 21:41:26 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * 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]
+
Mon Apr 4 11:50:40 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* test/test_tempfile.rb: simply ignore platform depedent testcases
diff --git a/io.c b/io.c
index 331420097a..7ce7148627 100644
--- a/io.c
+++ b/io.c
@@ -3958,7 +3958,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);