Sometimes there's just no accounting for taste...However, just as you can append an object to an
Array
using the
<<
operator, you can also append an object to an output
IO
stream:
endl = "\n"
$stdout << 99 << " red balloons" << endl
|
produces:
Again, the
<<
method uses
to_s
to convert its
arguments to strings before sending them on their merry way.