From: Robert Klemme Date: 2008-01-31T03:30:03+09:00 Subject: Re: Each time you code 'unless... else'... On 29.01.2008 21:26, Phlip wrote: >> unless File.exist? CONF_PATH >> Ultrasphinx.say "configuration file not found for >> #{RAILS_ENV.inspect} environment" >> Ultrasphinx.say "please run 'rake ultrasphinx:configure'" Isn't this rather a case for an exception? raise "please run 'rake ultrasphinx:configure'" unless File.exists? CONF_PATH >> else >> begin >> lines = open(CONF_PATH).readlines >> >> sources = lines.select do |line| >> >> ...Satan waterboards a kitten. > > Just a note - we have debugged the second bug in this library, in as > many days, and it also happened in the immediate vicinity of _another_ > unless... else. > > I'm picking a longhair tabby for this one. Uh... robert