From: Amos King Date: 2006-10-31T00:16:50+09:00 Subject: Re: true.to_i I don't see a problem with it. There is no to_i for either class so you wouldn't be overwriting any functionality there. I would say gtg. On 10/30/06, Leslie Viljoen wrote: > Hello > > I am processing database rows and I see that there are "bit" columns > that come out of ActiveRecord as true or false. I wanted binary digits > so I did this: > > class FalseClass > def to_i > 0 > end > end > > class TrueClass > def to_i > 1 > end > end > > ..which may or may not be really dumb. So is it really dumb? > > > -- > Man's unfailing capacity to believe what he prefers to be true rather > than what the evidence shows to be likely and possible has always > astounded me. We long for a caring Universe which will save us from > our childish mistakes, and in the face of mountains of evidence to the > contrary we will pin all our hopes on the slimmest of doubts. God has > not been proven not to exist, therefore he must exist. > > - Prokhor Zakharov > > -- Amos King USPS Programmer/Analyst St. Louis, MO