public Method

IO.<<(p1)

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;
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.