Carriage Return added during return of large string from class method

Discussion in 'Ruby' started by Xeno Campanoli, Feb 13, 2006.

  1. Say, this is a doosey: I'm constructing a string of markup for a CGI script,
    and I'm deciding to convert to print as I go rather than all at once, so I
    code, then start debugging, and to debug I dump markup. I then find that
    markup that looks good and clean just before I return from my class function
    (called by another class function if that's important) ends up having sections
    polluted with carriage returns (not all of it, just those newlines which
    precede each line of one of the three concatenated strings from the three
    files which I uploaded from my primary files (javascript code). So I get
    all these files loaded, strings concatenated, and right before I return them
    from my old function I dump them and they look fine. Right after they get
    returned from the old function to the new one, this one section has CRs. What
    gives? Were they there all along and suddenly only appear from some magic?
    How could it otherwise be that the function, in it's wild and unexpected
    massage of my markup, is guessing well enough to precede only those lines
    which correspond to one of my files?

    The code is non-trivial, and I cannot afford to pull it apart right now. I'll
    try to make the time tonight. Presumably this is something you gurus know all
    about.

    xc
    Xeno Campanoli, Feb 13, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Owen

    Allowing entry of a Carriage Return during data entry

    Mike Owen, Jul 27, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    679
    Alessandro Zifiglio
    Jul 27, 2006
  2. Charles Gamble
    Replies:
    3
    Views:
    145
    Roland Hall
    Feb 2, 2005
  3. Emmanuel Touzery

    how to insert a carriage return in a string

    Emmanuel Touzery, Jul 15, 2003, in forum: Ruby
    Replies:
    2
    Views:
    95
    Bermejo, Rodrigo
    Jul 15, 2003
  4. Steve Anderson
    Replies:
    3
    Views:
    234
    Steve Anderson
    Jun 21, 2004
  5. yellowtek
    Replies:
    2
    Views:
    110
    yellowtek
    Sep 12, 2006
Loading...

Share This Page