Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Carriage Return added during return of large string from class method

Reply
Thread Tools

Carriage Return added during return of large string from class method

 
 
Xeno Campanoli
Guest
Posts: n/a
 
      02-13-2006
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert a carriage return in a JavaScript string yellowtek Javascript 2 09-12-2006 09:43 PM
Allowing entry of a Carriage Return during data entry Mike Owen ASP .Net Web Controls 3 07-27-2006 02:34 PM
carriage return being strangely added when I perform a standard post Charles Gamble ASP General 3 02-02-2005 02:14 PM
Help: Delete a single carriage return in a file, but not a double carriage return? Steve Anderson Perl Misc 3 06-21-2004 12:48 AM
how to insert a carriage return in a string Emmanuel Touzery Ruby 2 07-15-2003 10:52 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57