Bill,

I didn't get what you wanted to mean by your examples.

If nil? can be in DbObject
true? and false? can be in DbObject.

--
Mohammad



On Fri, 2004-10-29 at 11:20, Bill Atkins wrote:
> So:
> 
> if (a.method_call == b.method_call).true?
> 
> as opposed to:
> 
> if a.method_call == b.method_call
> 
> ?
> 
> Is there some other situation where this would be an improvement?
> 
> Bill
> 
> On Sat, 30 Oct 2004 00:16:55 +0900, Mohammad Khan <mkhan / lextranet.com> wrote:
> > I prefer something like,
> > 
> > a.true?
> > not, a == true or a.class == TrueClass
> > 
> > And I think, most of us prefer to write code this way.
> > --
> > Mohammad
> > 
> > 
> > 
> > 
> > On Fri, 2004-10-29 at 11:12, Bill Atkins wrote:
> > > Why would that be nice?  :)
> > >
> > > Bill
> > >
> > > On Sat, 30 Oct 2004 00:10:49 +0900, Mohammad Khan <mkhan / lextranet.com> wrote:
> > > > Wouldn't it be nice to have two more methods true? and false? like nil?
> > > > in Object.
> > > >
> > > > n = NilClass.new
> > > > t = TrueClass.new
> > > > f = FalseClass.new
> > > >
> > > > n.nil? -> true
> > > > t.nil? -> false
> > > > f.nil? -> false
> > > >
> > > > n.true? -> false
> > > > t.true? -> true
> > > > f.true? -> false
> > > >
> > > > n.false -> false
> > > > t.false -> false
> > > > f.false -> true
> > > >
> > > > Thanks,
> > > > Mohammad
> > > >
> > > >
> > --
> > Mohammad Khan <mkhan / lextranet.com>
> > Legal Computer Solutions, Inc.
> > 
> >
-- 
Mohammad Khan <mkhan / lextranet.com>
Legal Computer Solutions, Inc.