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

ruby-changes:10009

From: yugui <ko1@a...>
Date: Fri, 16 Jan 2009 00:38:05 +0900 (JST)
Subject: [ruby-changes:10009] Ruby:r21552 (ruby_1_9_1): merges r21491 from trunk into ruby_1_9_1.

yugui	2009-01-16 00:37:42 +0900 (Fri, 16 Jan 2009)

  New Revision: 21552

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

  Log:
    merges r21491 from trunk into ruby_1_9_1.
    * io.c (rb_io_initialize): workaround for Windows. [ruby-dev:37686]
              (also see [ruby-dev:37721])

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/io.c

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 21551)
+++ ruby_1_9_1/ChangeLog	(revision 21552)
@@ -1,3 +1,8 @@
+Tue Jan 13 18:19:49 2009  NAKAMURA Usaku  <usa@r...>
+
+	* io.c (rb_io_initialize): workaround for Windows. [ruby-dev:37686]
+          (also see [ruby-dev:37721])
+
 Tue Jan 13 17:29:02 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* enc/trans/make_transdb.rb (converters): should not depend on the
Index: ruby_1_9_1/io.c
===================================================================
--- ruby_1_9_1/io.c	(revision 21551)
+++ ruby_1_9_1/io.c	(revision 21552)
@@ -5928,6 +5928,12 @@
     fp->encs = convconfig;
     clear_codeconv(fp);
     io_check_tty(fp);
+    if (fileno(stdin) == fd)
+	fp->stdio_file = stdin;
+    else if (fileno(stdout) == fd)
+	fp->stdio_file = stdout;
+    else if (fileno(stderr) == fd)
+	fp->stdio_file = stderr;
 
     return io;
 }

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

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