Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例:
puts <<BLOCK ... BLOCK
BLOCKは、キーワードと衝突しない他の識別子です。
はい; 任意の正当な記号または引用符で囲まれた文字列を使用できます。
たとえば、それに強烈な印象を与えたい場合は、引用された形式を使用する必要があります。
pry(main)> s = <<"foo!bar" pry(main)* yo pry(main)* foo!bar => "yo\n" pry(main)> puts s yo
シンボルの場合は、引用する必要はありません。