/*
* call-seq:
*
* Kgio.trywrite(io, str) -> nil, String or :wait_writable
*
* Returns nil if the write was completed in full.
*
* Returns a String containing the unwritten portion if EAGAIN
* was encountered, but some portion was successfully written.
*
* Returns :wait_writable if EAGAIN is encountered and nothing
* was written.
*
* Maybe used in place of PipeMethods#kgio_trywrite for non-Kgio objects
*/
static VALUE s_trywrite(VALUE mod, VALUE io, VALUE str)
{
return my_write(io, str, 0);
}