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

ruby-changes:25729

From: nobu <ko1@a...>
Date: Wed, 21 Nov 2012 22:53:14 +0900 (JST)
Subject: [ruby-changes:25729] nobu:r37786 (trunk): wait.c: wait_readable

nobu	2012-11-21 22:53:02 +0900 (Wed, 21 Nov 2012)

  New Revision: 37786

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

  Log:
    wait.c: wait_readable
    
    * ext/io/wait/wait.c (io_wait_readable): add alias wait_readable.

  Modified files:
    trunk/ChangeLog
    trunk/NEWS
    trunk/ext/io/wait/wait.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37785)
+++ ChangeLog	(revision 37786)
@@ -1,5 +1,7 @@
-Wed Nov 21 22:39:28 2012  Nobuyoshi Nakada  <nobu@r...>
+Wed Nov 21 22:52:59 2012  Nobuyoshi Nakada  <nobu@r...>
 
+	* ext/io/wait/wait.c (io_wait_readable): add alias wait_readable.
+
 	* ext/io/wait/wait.c (io_wait_writable): this is easier to use than
 	  IO.select for a single IO object and is immune to the
 	  limitations/innefficiency of select() on platforms where poll/ppoll
Index: ext/io/wait/wait.c
===================================================================
--- ext/io/wait/wait.c	(revision 37785)
+++ ext/io/wait/wait.c	(revision 37786)
@@ -40,7 +40,8 @@
 #endif
 
 static VALUE io_ready_p _((VALUE io));
-static VALUE io_wait _((int argc, VALUE *argv, VALUE io));
+static VALUE io_wait_readable _((int argc, VALUE *argv, VALUE io));
+static VALUE io_wait_writable _((int argc, VALUE *argv, VALUE io));
 void Init_wait _((void));
 
 /*
@@ -101,7 +102,7 @@
  */
 
 static VALUE
-io_wait(int argc, VALUE *argv, VALUE io)
+io_wait_readable(int argc, VALUE *argv, VALUE io)
 {
     rb_io_t *fptr;
     int i;
@@ -178,6 +179,7 @@
 {
     rb_define_method(rb_cIO, "nread", io_nread, 0);
     rb_define_method(rb_cIO, "ready?", io_ready_p, 0);
-    rb_define_method(rb_cIO, "wait", io_wait, -1);
+    rb_define_method(rb_cIO, "wait", io_wait_readable, -1);
+    rb_define_method(rb_cIO, "wait_readable", io_wait_readable, -1);
     rb_define_method(rb_cIO, "wait_writable", io_wait_writable, -1);
 }
Index: NEWS
===================================================================
--- NEWS	(revision 37785)
+++ NEWS	(revision 37786)
@@ -152,6 +152,11 @@
     * added method:
       * added main.define_method which defines a global function.
 
+* io/wait:
+  * new features:
+    * added IO#wait_writable method.
+    * added IO#wait_readable method as alias of IO#wait.
+
 * net/http
   * new features:
     * Proxies are now automatically detected from the http_proxy environment

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

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