From: David Vallner Date: 2006-02-10T10:57:26+09:00 Subject: Re: Ruby 1.8.4 behaviour - 2 questions Dňa Štvrtok 09 Február 2006 17:51 ara.t.howard@noaa.gov napísal: > > target_f += { source_f ? source_f : 0.00 } > > target_f += source_f.to_f > I'd have used: target_f += source_f || 0.0 myself, but after hacking at irb a bit, ara's method seems somewhat sexier than that rather standard Ruby idiom. A nice perk is that it won't bug out on when the database returns the data as a String. David Vallner