Ruby 2.3.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Stringクラス > <<
self << other -> self[permalink][rdoc]concat(other) -> selfself に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self を返します。
例
str = "string"
str.concat "XXX"
p str    # => "stringXXX"
str << "YYY"
p str    # => "stringXXXYYY"
str << 65  # 文字AのASCIIコード
p str    # => "stringXXXYYYA"