Passing a block to rb_funcall

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

Regards,

Dan

···

-----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.