Help with <<-EOF


#1

Hi,

I have a piece of code like:
xmlData=<<-EOF
xml code
EOF

I need to change it into:
xmlData="
xml code
"

but I don’t know why… it doesn’t work when I change it into a normal
string.

Any idea?


#2

On 11 May 2009, at 17:37, Mario R. wrote:

"

but I don’t know why… it doesn’t work when I change it into a normal
string.

Any idea?

Are you escaping all double quotes in the string?
Also, why do you need to make the change?

Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net

raise ArgumentError unless @reality.responds_to? :reason


#3

Ok… I did it.
I think the problem was a special character at the beginning of the
string.
Thanks for your time.

Mario R. wrote:

There are no double quotes…


#4

There are no double quotes…

I need to do it because is a requirement from the client :frowning:
(all string should be assigned by ")

Eleanor McHugh wrote:

On 11 May 2009, at 17:37, Mario R. wrote:

"


#5

On 11 May 2009, at 18:19, Mario R. wrote:

There are no double quotes…

I need to do it because is a requirement from the client :frowning:
(all string should be assigned by ")

Well I guess there’s no accounting for clients lol

Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net

raise ArgumentError unless @reality.responds_to? :reason


#6

On 11.05.2009 19:26, Eleanor McHugh wrote:

On 11 May 2009, at 18:19, Mario R. wrote:

There are no double quotes…

I need to do it because is a requirement from the client :frowning:
(all string should be assigned by ")

Well I guess there’s no accounting for clients lol

I’d be curios to hear the reason for this requirement.

Cheers

robert