Lil problem w/heredoc

I’m having some trouble w/heredoc.
this works

        s += "
            <div style='border-left:1px solid 

#dddddd;padding:5;’>
#{child[‘title’]}

<em title=’#{child[‘ip’]}’>#{child[‘client’]}

#{parse(child[‘value’])}


<a
href=‘javascript:add(#{child[‘id’]})’>Reply


#{node(child[‘id’])}


"
…but this does not…
s += <<-EOS

#{child[‘title’]}

<em title=’#{child[‘ip’]}’>#{child[‘client’]}

#{parse(child[‘value’])}

<a
href=‘javascript:add(#{child[‘id’]})’>Reply


#{node(child[‘id’])}


EOS

Anyone know what i’m doing wrong?

linux,ruby1.6,mod_ruby

I’m having some trouble w/heredoc.
[snip]
…but this does not…
s += <<-EOS
<div style='border-left:1px solid
[snip]

EOS

Anyone know what i’m doing wrong?

Ruby is sensitive to if there is whitespaces after the ending EOS.

Besides that I don’t see any problems.

···

On Wed, 07 Apr 2004 12:16:08 +0900, Paul Vudmaska wrote:


Simon Strandgaard

Simon Strandgaard wrote:

···

On Wed, 07 Apr 2004 12:16:08 +0900, Paul Vudmaska wrote:

I’m having some trouble w/heredoc.

[snip]

…but this does not…
s += <<-EOS
<div style='border-left:1px solid

[snip]

           </div>
       EOS

Anyone know what i’m doing wrong?

Ruby is sensitive to if there is whitespaces after the ending EOS.

Besides that I don’t see any problems.


Simon Strandgaard

!! I had a space following the EOS…now it’s gone and it works. That’s
kicked my buttox a couple times but no more,
Thank you Simon!
:stuck_out_tongue: