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

ruby-changes:3481

From: ko1@a...
Date: 10 Jan 2008 10:54:57 +0900
Subject: [ruby-changes:3481] matz - Ruby:r14974 (trunk): * io.c (io_encoding_set): IO.pipe("euc-jp", nil) should work as

matz	2008-01-10 10:54:43 +0900 (Thu, 10 Jan 2008)

  New Revision: 14974

  Modified files:
    trunk/ChangeLog
    trunk/io.c

  Log:
    * io.c (io_encoding_set): IO.pipe("euc-jp", nil) should work as
      IO.pipe("euc-jp", nil).  [ruby-dev:33000]

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14974&r2=14973&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=14974&r2=14973&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14973)
+++ ChangeLog	(revision 14974)
@@ -1,3 +1,8 @@
+Thu Jan 10 10:15:03 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* io.c (io_encoding_set): IO.pipe("euc-jp", nil) should work as
+	  IO.pipe("euc-jp", nil).  [ruby-dev:33000]
+
 Thu Jan 10 02:41:22 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* io.c (rb_io_binmode): should not alter encoding.  [ruby-dev:32918]
Index: io.c
===================================================================
--- io.c	(revision 14973)
+++ io.c	(revision 14974)
@@ -5621,6 +5621,7 @@
 static void
 io_encoding_set(rb_io_t *fptr, int argc, VALUE v1, VALUE v2)
 {
+    if (NIL_P(v2)) argc = 1;
     if (argc == 2) {
 	fptr->enc2 = rb_to_encoding(v1);
 	fptr->enc = rb_to_encoding(v2);

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

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