From: Simon Strandgaard Date: 2004-03-17T21:14:35+09:00 Subject: Re: why use heredoc in doublequotes? On Wed, 17 Mar 2004 09:12:23 +0100, Robert Klemme wrote: > > "Simon Strandgaard" schrieb im Newsbeitrag > news:pan.2004.03.16.19.37.24.107822@adslhome.dk... >> When you can do like this: >> >> server> ruby a.rb >> "im some text\n" >> server> cat a.rb >> str = <> im soooome text >> TEXT >> p str >> server> >> >> >> What is the rationale for doing <<"TEXT" ? >> >> Have I misunderstood it? > > IMHO "< can use white space in the delimiter (see example d): [snip] > irb(main):024:0> d=<<"HERE AM I" > irb(main):025:0" 5+2=#{5+2} > irb(main):026:0" HERE AM I > => "5+2=7\n" > Space the final frontier... Thanks Robert for clearing that out ;-) However I see doublequoted heredocs everywhere.. I don't think there is a common understanding of what it does (yet). -- Simon Strandgaard