mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
wait.c: wait_readable
* ext/io/wait/wait.c (io_wait_readable): add alias wait_readable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e786aa711d
commit
45faa57b49
3 changed files with 13 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
|||
Wed Nov 21 22:39:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Wed Nov 21 22:52:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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
|
||||
|
|
5
NEWS
5
NEWS
|
@ -152,6 +152,11 @@ with all sufficient information, see the ChangeLog file.
|
|||
* 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
|
||||
|
|
|
@ -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 @@ io_ready_p(VALUE io)
|
|||
*/
|
||||
|
||||
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 @@ Init_wait()
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue