mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
spec/ruby/optional/capi/ext/io_spec.c: guard unreachable code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4610d36c4c
commit
9071cd6393
1 changed files with 2 additions and 0 deletions
|
@ -150,6 +150,7 @@ VALUE io_spec_rb_io_wait_readable(VALUE self, VALUE io, VALUE read_p) {
|
|||
if (set_non_blocking(fd) == -1)
|
||||
rb_sys_fail("set_non_blocking failed");
|
||||
|
||||
# if !SET_NON_BLOCKING_FAILS_ALWAYS
|
||||
if(RTEST(read_p)) {
|
||||
if (read(fd, buf, RB_IO_WAIT_READABLE_BUF) != -1) {
|
||||
return Qnil;
|
||||
|
@ -172,6 +173,7 @@ VALUE io_spec_rb_io_wait_readable(VALUE self, VALUE io, VALUE read_p) {
|
|||
}
|
||||
|
||||
return ret ? Qtrue : Qfalse;
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue