Just test for sys{read,write} in is_io()
This commit is contained in:
parent
892e1637b1
commit
057f8b3390
1 changed files with 2 additions and 1 deletions
|
@ -244,7 +244,8 @@ is_string_array(VALUE v)
|
|||
static int
|
||||
is_io(VALUE v)
|
||||
{
|
||||
return rb_obj_is_kind_of(v, rb_cIO) == Qtrue;
|
||||
return rb_respond_to(v, rb_intern("sysread")) &&
|
||||
rb_respond_to(v, rb_intern("syswrite"));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue