RubyIO io = (RubyIO)_io;
OpenFile fptr;
// ioctl_arg n;
fptr = io.getOpenFileChecked();
fptr.checkReadable(context);
if (fptr.readPending() != 0) return runtime.getTrue();
// TODO: better effort to get available bytes from our channel
// if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qnil;
// if (ioctl(fptr->fd, FIONREAD, &n)) return Qnil;
// if (n > 0) return Qtrue;