On Tue, 22 Feb 2005 00:48:42 +0900, Christian Neukirchen
<chneukirchen / gmail.com> wrote:
> Brian Schr?der <ruby.brian / gmail.com> writes:
> 
> > On Tue, 22 Feb 2005 00:14:41 +0900, Christian Neukirchen
> >> Then, stuff like that would be possible
> >>
> >> while line = gets.ignore_if_nil.chomp
> >>   ...
> >> end
> >>
> >> Maybe just a crazy idea... :-)
> >
> > What would the ignore_if_nil call in your example do? Wouldn't the
> > above be equivalent to
> >
> > while line = gets.chomp
> >   ...
> > end
> 
> gets returns nil on EOF.
> 

Yes, and you wanted a nil that eats its messages silently. So it would
also eat chomp. I meant, if you have a all eating nil then
nil.ignore_if_nil.chomp === nil.chomp.

Regards,

Brian