From: ara.t.howard@... Date: 2006-02-03T00:47:29+09:00 Subject: Re: ruby-dev summary 28206-28273 On Fri, 3 Feb 2006, Berger, Daniel wrote: >> -----Original Message----- >> From: ara.t.howard@noaa.gov [mailto:ara.t.howard@noaa.gov] >> Sent: Thursday, February 02, 2006 8:36 AM >> To: ruby-talk ML; ruby-core@ruby-lang.org >> Subject: Re: ruby-dev summary 28206-28273 > > > >> suggestion: >> >> >> harp:~ > cat a.rb >> # >> # predicate methods to avoid double evaluation of expr >> # >> module Kernel >> def iff?(a, &b) a.instance_eval &b if a end >> alias_method "if?", "iff?" >> def iff!(a, &b) a.instance_eval &b unless a end >> alias_method "if!", "iff!" >> end > > Now *that* is freaky. I swear, I wrote and sent my response not 2 > seconds before I saw this. too many computer science classes out there i guess. ;-) -a -- happiness is not something ready-made. it comes from your own actions. - h.h. the 14th dali lama