From: Robert Klemme Date: 2010-03-06T23:30:12+09:00 Subject: Re: Different behavior of '$,' output separator in Ruby 1.9 On 03/05/2010 08:46 PM, Caleb Clausen wrote: > On 3/5/10, Alex DeCaria wrote: >> In switching to Ruby 1.9 from 1.8 I notice that the behavior of the '$,' >> output separator has changed. In Ruby 1.9 the output separator is >> placed after a newline character, but this didn't happen with Ruby 1.8. > > That doesn't seem right. I agree. 1.9 writes one field separator too much. This must be a bug. Alex, separators are intended to be used a tad differently. You would rather set the output record separator as well: robert@fussel:~$ ruby -e '$,="@";$\="NL\n";print 1,2,3' 1@2@3NL robert@fussel:~$ Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/