ios << obj → ios
String Output—Writes obj to ios. obj will be converted to a string using to_s.
$stdout << "Hello " << "world!\n"
produces:
Hello world!
Source Code
/* * call-seq: * ios << obj => ios * * String Output---Writes <i>obj</i> to <em>ios</em>. * <i>obj</i> will be converted to a string using * <code>to_s</code>. * * $stdout << "Hello " << "world!\n" * * <em>produces:</em> * * Hello world! */ VALUE rb_io_addstr(io, str) VALUE io, str; { rb_io_write(io, str); return io; }
<code/>and<pre/>for code samples.