puts
adds a new line to the end of each argument if there is not one already.
print
does not add a new line.
For example:
puts [[1,2,3], [4,5,nil]]
Would return:
1
2
3
4
5
Whereas print [[1,2,3], [4,5,nil]]
would return:
[[1,2,3], [4,5,nil]]
Notice how puts does not output the nil value whereas print does.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…