[前][次][番号順一覧][スレッド一覧]

ruby-changes:14657

From: yugui <ko1@a...>
Date: Sat, 30 Jan 2010 22:07:20 +0900 (JST)
Subject: [ruby-changes:14657] Ruby:r26505 (ruby_1_9_1): merges r25485 from trunk into ruby_1_9_1.

yugui	2010-01-30 21:53:10 +0900 (Sat, 30 Jan 2010)

  New Revision: 26505

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26505

  Log:
    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]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/test/ruby/test_io.rb
    branches/ruby_1_9_1/version.h

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 26504)
+++ ruby_1_9_1/ChangeLog	(revision 26505)
@@ -1,3 +1,8 @@
+Mon Oct 26 12:06:27 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* io.c (io_cntl): F_DUPFD is platform dependent.
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 26504)
+++ ruby_1_9_1/version.h	(revision 26505)
@@ -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
Index: ruby_1_9_1/test/ruby/test_io.rb
===================================================================
--- ruby_1_9_1/test/ruby/test_io.rb	(revision 26504)
+++ ruby_1_9_1/test/ruby/test_io.rb	(revision 26505)
@@ -1085,6 +1085,21 @@
     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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]