[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Passing a block to rb_funcall

Berger, Daniel

5/31/2005 7:02:00 PM

> -----Original Message-----
> From: Berger, Daniel [mailto:Daniel.Berger@qwest.com]
> Sent: Tuesday, May 31, 2005 10:46 AM
> To: ruby-talk ML
> Subject: Re: Passing a block to rb_funcall
>
> /* rb_io_s_foreach */
> if (argc == 1) {
> arg.sep = rb_default_rs;
> }
>
> Should instead be:
>
> if(NIL_P(arg.sep))
> arg.sep = rb_default_rs;
>
> That is, unless we *want* nil to mean paragraph mode. I was
> always under the impression that only "" (an empty string)
> would force paragraph mode.

Hmmm...I guess nil is a special case with regards to $/ and is extra
slurpy. Nevermind.

Regards,

Dan