From: "Jesús Gabriel y Galán" Date: 2009-10-06T18:30:37+09:00 Subject: Re: new line in string On Tue, Oct 6, 2009 at 11:23 AM, Sharanya Suresh wrote: > Hi, > > How to concatenate new line character to a string? > > Eg: str = "hello"; >    str += '\n'; >    str += "world" > I must get > hello > world > How it can be done? You nearly got it: str = "hello"; str += "\n"; str += "world" You just need to use double quotes. Single quotes don't interpret special characters: irb(main):006:0> "\n".size => 1 irb(main):007:0> '\n'.size => 2 Hope this helps, Jesus.