From: Tristin Davis Date: 2008-06-27T04:01:06+09:00 Subject: Re: A cleaner way to pass a block or proc ------=_Part_6530_5402949.1214507002913 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Can you explain it to me? @notifiers << ( Proc::new rescue notifier) On Thu, Jun 26, 2008 at 1:44 PM, Robert Dober wrote: > On Thu, Jun 26, 2008 at 4:27 PM, ara.t.howard > wrote: > > > > On Jun 26, 2008, at 4:39 AM, Robert Dober wrote: > > > >> def add_notfier notifier=nil > >> @notifiers << ( Proc::new rescue notifier) > >> end > > > > still adds nil if no args given though... > > > > > > cheers. > > > > a @ http://codeforpeople.com/ > > -- > > we can deny everything, except that we have the possibility of being > better. > > simply reflect on that. > > h.h. the 14th dalai lama > > > That is what OP wanted IIANM, the nils raise an exception later on. > Anyway I thought I had made it clear that your code is preferable but > I feel that teaching what Proc::new is about, is part of our job here > ;) > > Cheers > Robert > > ------=_Part_6530_5402949.1214507002913--