summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:53:10 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:53:10 +0000
commit4b8d9cffdd7d74b858d872840d615c8b82ceaa4f (patch)
tree136753f165441bfa52f94d9bef9a07b20549645e
parent4d5af95020d069543862acc39dd29fb9c46ea4b6 (diff)
merges r25485 from trunk into ruby_1_9_1.
-- * io.c (io_fwrite): adjust stdio file position after direct write on BSDish platforms. [ruby-core:26300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_io.rb15
-rw-r--r--version.h2
3 files changed, 21 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c35e277d9..fc42212bb8 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 13:33:58 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (io_cntl): F_DUPFD is platform dependent.
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 3550162aa9..2fd4f77f40 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1085,6 +1085,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 b999dcb5d3..76effda1d1 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 410
+#define RUBY_PATCHLEVEL 411
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1