From: Gavin Sinclair Date: 2003-01-16T14:08:58+09:00 Subject: Re: ruby-dev summary 19198-19345 On Thursday, January 16, 2003, 3:19:13 PM, Tom wrote: > currently i generally just use %Q{...} instead of here docs. > p %Q{ > foo > bar > } I think I might start using that more often. It's nice, and it's easier to chain. e.g. with an appropriate String#tabto(n) method (a la StringFormattingFunctions on the Wiki), you can resolve the indentation like so: s = %Q{ hi how are you? }.tabto(0) Which gives "\nhi\n how are you?\n". That code would highlight fine, whereas using here-docs can sometimes be troublesome. One difference between this and a here-doc is the initial newline, which is a shame. Gavin