Ruby is capable of doing operator overloading, and the << operator has
been consistently overloaded to do stuff like appending data (I
believe this was an idea that came from C++). Note also that use of <<
on strings is much faster than +=, since += will create a new string,
append the string you're adding to it, and replace the old string by
the new one, while, if I'm not mistaken << will append the data on its
right side in place, if I recall correctly.

Several other classes also overload the << operator. Using << on an
array will append the right hand side to the end of the array
(equivalent to Array#push). << on an IO object will write the object
on the right hand side, converting it to a string, just as someone
coming from C++ might expect.

-- 
普通じゃないのが当然なら答える私は何ができる?
普通でも普通じゃなくて感じるまま感じることだけをするよ!
http://stormwyrm.blogspot.com