On 13.12.2006 23:14, Austin Ziegler wrote:
> On 12/13/06, Robert Klemme <shortcutter / googlemail.com> wrote:
>> $ ruby -e 'print "foo\r\n", "bar"' | od -c
>> 0000000   f   o   o  \r  \n   b   a   r
>> 0000010
>>
>> $ ruby -v
>> ruby 1.8.5 (2006-08-25) [i386-cygwin]
>>
>> Hm...  Is this a bug in Ruby 1.8.5 or am I missing something?
> 
> Yeah. You're using the disaster known as cygwin.

So far it has served me very well.  The fact that cygwin not generally 
prevents the output of "\r\n" makes me believe there has to be something 
in the implementation of Ruby.  Maybe you can elaborate further in what 
disastrous ways cygwin interferes here (other than running on a Windows 
box).  I also noticed this - on a Linux box:

PDBRK_MYSQL:~# ruby -e '$\="\r\n"; puts "foo", "bar"' | od -c
0000000   f   o   o  \n   b   a   r  \n
0000010
PDBRK_MYSQL:~# uname -a
Linux PDBRK_MYSQL 2.6.8-2-386 #1 Tue Aug 16 12:46:35 UTC 2005 i686 GNU/Linux
PDBRK_MYSQL:~# ruby -v
ruby 1.8.2 (2005-04-11) [i386-linux]

Now, is Debian Linux disastrous, too? :-)

Kind regards

	robert