pub unsafe extern "C" fn rb_io_write(io: VALUE, str_: VALUE) -> VALUEExpand description
Writes the given string to the given IO.
@param[out] io An IO, opened for writing.
@param[in] str A String-like object to write to io.
@exception rb_eIOError io isn’t opened for writing.
@exception rb_eFrozenError io is frozen.
@exception rb_eTypeError No conversion from str to String.
@exception rb_eSystemCallError write(2) failed for some reason.
@return The number of bytes written to the io.
@post str (up to the length of return value) is written to io.
@note This function blocks.
@note Partial write is a thing. It must be at least questionable not
to check the return value.
@internal
§Above description is in fact inaccurate. This function can take arbitrary
objects, and calls their write method. What is written above in fact
describes how IO#write works. You can pass StringIO etc. here, and would
work completely differently.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.3.8