------art_131321_13248764.1152698858432
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 7/12/06, Logan Capaldo <logancapaldo / gmail.com> wrote:
>
>
> On Jul 12, 2006, at 12:30 AM, Minkoo Seo wrote:
>
> > I should have to mention this problem explicitly.
> >
> > AFAIK, $/ is 'input record separator' while $\ is 'output record
> > separator.'
> > And the problem is:
> >
> > $ruby -e 'p "a"'
> > "a"
> > $
> >
> > As you can see p is printing new line character. But the spec says
> > that
> > p is supposed to print 'output record separator' after printing out
> > given
> > arguments.
> >
> > Let's see what current output record separator is...
> >
> > $ruby -e 'p $\'
> > nil
> > $
> >
> > Surprisingly, $\, output record separator, is nil while Kernel#p
> > printed new
> > line.
> >
> > So I guess one of the following holds:
> > (1) p prints new line instead of output record separator.
> > (2) Somehow, $\ is converted into newline while Kernel#p is running
> > (3) $\ is not a output record separator, actually.
> >
> > Any idea?
> >
> > - Minkoo Seo
> >
> >
> >
>
> Ack, top posting evil.
>
> $\ is the output record separator if print is any indicator
>
> % cat outputsep.rb
> $\  :"
> print 1
> puts
>
>
> % ruby outputsep.rb
> 1:
>
> I think maybe the docs lie. Looking at the C code, p uses
> rb_default_rs (when maybe they meant to use rb_output_rs?)



Could anybody tell me where I have to file the bug report on the
document of 'Kernel#p'?

Sincerely,
Minkoo Seo

------art_131321_13248764.1152698858432--