multiple and nested heredocs

Ruby code posted
created at 29 Mar 16:12, updated at 29 Mar 16:14

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
def hey_hi
puts <<HEY, <<HI
hey #{hello}
HEY
hi #{"hmm #{false or 1.upto(3)}".gsub('', <<-HIAGAIN)}
hi
again
HIAGAIN
bye
HI
end
137 Bytes in 2 ms with coderay