I have found this code block on Wikipedia as an example of a quine (program that prints itself) in Ruby.
puts <<2*2,2
puts <<2*2,2
2
However, I do not get how it works. Especially, what I do not get is that when I remove the last line, I get this error:
syntax error, unexpected $end, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
What happens in those lines?