Help with <<-EOF

Discussion in 'Ruby' started by Mario Ruiz, May 11, 2009.

  1. Mario Ruiz

    Mario Ruiz Guest

    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?
     
    Mario Ruiz, May 11, 2009
    #1
    1. Advertisements

  2. 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
     
    Eleanor McHugh, May 11, 2009
    #2
    1. Advertisements

  3. Mario Ruiz

    Mario Ruiz Guest

    There are no double quotes...

    I need to do it because is a requirement from the client :(
    (all string should be assigned by ")
     
    Mario Ruiz, May 11, 2009
    #3
  4. Mario Ruiz

    Mario Ruiz Guest

    Ok... I did it.
    I think the problem was a special character at the beginning of the
    string.
    Thanks for your time.
     
    Mario Ruiz, May 11, 2009
    #4
  5. Well I guess there's no accounting for clients lol


    Ellie

    Eleanor McHugh
    Games With Brains
    http://slides.games-with-brains.net
     
    Eleanor McHugh, May 11, 2009
    #5
  6. I'd be curios to hear the reason for this requirement.

    Cheers

    robert
     
    Robert Klemme, May 11, 2009
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.