From e95144436f8dccb3a30b5a1d59f8df8e52afb994 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 29 May 2011 22:48:53 +0000 Subject: 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 --- ChangeLog | 8 ++++++++ io.c | 2 +- version.h | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf63898cf8..9a77ba9a38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Apr 4 21:41:26 2011 KOSAKI Motohiro + + * 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] + Fri Mar 25 19:39:40 2011 Ben Walton * test/test_syslog.rb: 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); diff --git a/version.h b/version.h index 1f06e81051..ac1e844c0b 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 221 +#define RUBY_PATCHLEVEL 222 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- cgit v1.2.3