Re: [PATCH] object.c ruby.h (fwd)

From: "NAKAMURA, Hiroshi" <nahi@...>
Date: 2002-08-12 03:48:45 UTC
List: ruby-core #320
Hi, Suketa-san,

> From: Masaki Suketa [mailto:masaki.suketa@nifty.ne.jp] 
> Sent: Saturday, August 10, 2002 9:20 PM

> > > If I add assert_true method which checks 'foo == true',
> > > could you live with it more pleasantly?
> > 
> > Yes, I can.  At the next, does method 'assert' become
> > 'deprecated'?  ...Sorry, I don't mean it.  I just
> > remembered JUnit...
> 
> No, at least I never deprecate 'assert' method.
> 
>   assert(foo)  # foo should not be nil nor false.
>   assert_true(foo) # foo should be true.

It's slightly regrettable for me that it won't be deprecated.
But don't care about me.  I'm only one of users. :)

> If I want to test that foo should not be nil,
> I'll use assert. If I want to test that 
> foo should be true, I'll use assert_true.

If I want to test "foo should not be nil", I'll write
  assert_true( foo != nil )
because it it straight for me to show my intent than
  assert( foo )

Regards,
// NaHi

In This Thread