From: Peter Vandenabeele Date: 2012-01-23T21:50:47+09:00 Subject: Re: codepart - please explain! --00235446fd44ace20204b7317ab8 Content-Type: text/plain; charset=UTF-8 On Mon, Jan 23, 2012 at 1:35 PM, Robert Klemme wrote: > On Sun, Jan 22, 2012 at 7:10 PM, Peter Vandenabeele > wrote: > ... > > def runCode > > return < > (..) > > STARTCODE # NO margin left of STARTCODE > > end > > Careful with comments on that line: > > 13:33:38 Temp$ ruby19 x.rb > x.rb:6: can't find string "STARTCODE" anywhere before EOF > x.rb:2: syntax error, unexpected $end, expecting tSTRING_CONTENT or > tSTRING_DBEG or tSTRING_DVAR or tSTRING_END > 13:34:12 Temp$ cat -n x.rb > 1 > 2 s=< 3 x > 4 STARTCODE # NO margin left of STARTCODE > 5 > 6 p s > 13:34:14 Temp$ > > Cheers > > robert > Indeed. I did some tests now and if I see correctly, both the EOS (End Of String) and -EOS here doc formats require that EOS is immediately followed by a newline in the code. Thank you :-) Peter --00235446fd44ace20204b7317ab8--