summaryrefslogtreecommitdiff
path: root/ext/stringio
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-27 13:22:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-27 13:22:40 +0000
commit8252adfd5a6020a8b3dad173f71e9012ba5c6acf (patch)
tree4a61954426334085fd52726bfc1a18c69bbe884b /ext/stringio
parent0d76affdf905a72a6bcb25530ca13468bc36a0bc (diff)
* ext/stringio/stringio.c (Init_stringio): added read_nonblock and
write_nonblock aliases. [ruby-dev:39551] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio')
-rw-r--r--ext/stringio/stringio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index ab4a78c..802c462 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1410,6 +1410,7 @@ Init_stringio()
rb_define_method(StringIO, "read", strio_read, -1);
rb_define_method(StringIO, "sysread", strio_sysread, -1);
rb_define_method(StringIO, "readpartial", strio_sysread, -1);
+ rb_define_method(StringIO, "read_nonblock", strio_sysread, -1);
rb_define_method(StringIO, "write", strio_write, 1);
rb_define_method(StringIO, "<<", strio_addstr, 1);
@@ -1418,6 +1419,7 @@ Init_stringio()
rb_define_method(StringIO, "putc", strio_putc, 1);
rb_define_method(StringIO, "puts", strio_puts, -1);
rb_define_method(StringIO, "syswrite", strio_syswrite, 1);
+ rb_define_method(StringIO, "write_nonblock", strio_syswrite, 1);
rb_define_method(StringIO, "isatty", strio_isatty, 0);
rb_define_method(StringIO, "tty?", strio_isatty, 0);