summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-26 03:06:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-26 03:06:29 +0000
commitb0af034e5333381f154747e5bbc7c12feb9495ad (patch)
tree7bf20e980954e65d23506fd72ad7b7db063b4608
parente57baca1d2f35f18d0b89741af3144ed074cdfa3 (diff)
downloadruby-b0af034e5333381f154747e5bbc7c12feb9495ad.tar.gz
ruby-b0af034e5333381f154747e5bbc7c12feb9495ad.tar.xz
ruby-b0af034e5333381f154747e5bbc7c12feb9495ad.zip
* io.c (io_fwrite): adjust stdio file position after direct write on
BSDish platforms. [ruby-core:26300] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_io.rb15
-rw-r--r--version.h4
3 files changed, 22 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d194e58d..e07e14020 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Oct 26 12:06:27 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (io_fwrite): adjust stdio file position after direct write on
+ BSDish platforms. [ruby-core:26300]
+
Sun Oct 25 15:44:24 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dl/handle.c (dlhandle_sym): fixed an invalid local variable
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 71f31e37a..0052a9263 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1167,6 +1167,21 @@ class TestIO < Test::Unit::TestCase
end
end
+ def test_pos
+ t = make_tempfile
+
+ open(t.path, IO::RDWR|IO::CREAT|IO::TRUNC, 0600) do |f|
+ f.write "Hello"
+ assert_equal(5, f.pos)
+ end
+ open(t.path, IO::RDWR|IO::CREAT|IO::TRUNC, 0600) do |f|
+ f.sync = true
+ f.read
+ f.write "Hello"
+ assert_equal(5, f.pos)
+ end
+ end
+
def test_sysseek
t = make_tempfile
diff --git a/version.h b/version.h
index b5b670b8a..493f6bd69 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2009-10-25"
+#define RUBY_RELEASE_DATE "2009-10-26"
#define RUBY_PATCHLEVEL -1
#define RUBY_BRANCH_NAME "trunk"
@@ -8,7 +8,7 @@
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2009
#define RUBY_RELEASE_MONTH 10
-#define RUBY_RELEASE_DAY 25
+#define RUBY_RELEASE_DAY 26
#include "ruby/version.h"