From: James Edward Gray II Date: 2006-03-05T13:25:54+09:00 Subject: Re: Kirbybase Hacks NilClass On Mar 4, 2006, at 7:34 PM, Jamey Cribbs wrote: > #select { |r| (r.speed and r.speed > 300) or (r.range and r.range < > 900) or (r.service_date and r.service_date < Date.today) } select { |r| r.speed > 300 or r.range < 900 or r.service_date < Date.today rescue false } > You should be able to just write: > > #select { |r| r.speed > 300 or r.range < 900 or r.service_date < > Date.today } I'm great with that goal really, I just don't think changing Ruby semantics is the way to get there. > Anyway, I hear ya, James. You want me to quit messin' around with > NilClass. Here's my new idea. What about solving this with default values for columns? If speed was defaulting to 0 instead of nil, we wouldn't have a problem. That seems to me to be what these example's intend anyway. Am I crazy? James Edward Gray II