Nick,

I owe you a beer.

Thanks a million!

Nik Kantar
Web Engineer
MIPS Computation
[EMAIL PROTECTED]
7964-C Arjons Drive
San Diego, Ca 92126-4392
tel +1 858/530.0400 x24
fax +1 858/530.2226



Nick Zadrozny wrote:
On 5/1/07, Nik Kantar <[EMAIL PROTECTED]> wrote:
cart_file.puts(prod.title.to_s)

So it's that call to puts that's putting in your newlines. From the
docs, IO#puts "writes a record separator (typically a newline) after
any that do not already end with a newline sequence."
http://www.rubycentral.com/book/ref_c_io.html#IO.puts

That record separator variable is $\, so you can try setting $\ =
"\r\n". I'm not sure if that will mess with other parts of your app,
so, alternatively, you can just add the newline to your IO#puts call:

cart_file.puts(prod.title.to_s + "\r\n")

------------------------------------------------------------------------

_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to