How to add extra newline with 'puts' without sticking newline character into string? How to add extra newline with 'puts' without sticking newline character into string? ruby ruby

How to add extra newline with 'puts' without sticking newline character into string?


Just make another call to puts:

puts "Hello"puts


I often find myself adding a constant in ruby to contain these characters

NEW_LINE = "\n"puts "Hello" + NEW_LINE

I think it is more readable and makes a change to all newline characters easy if anyone ever decides to separate each line by something else at some later date.