[#237] object.c ruby.h (fwd) — Robert Skarwecki <skaav@...>

Hello everybody,

42 messages 2002/07/24
[#239] Re: [PATCH] object.c ruby.h (fwd) — GOTO Kentaro <gotoken@...> 2002/07/24

At Thu, 25 Jul 2002 00:02:28 +0900,

[#240] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/24

GOTO Kentaro <gotoken@notwork.org> writes:

[#246] Re: [PATCH] object.c ruby.h (fwd) — GOTO Kentaro <gotoken@...> 2002/07/25

At Thu, 25 Jul 2002 05:05:46 +0900,

[#247] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/25

GOTO Kentaro <gotoken@notwork.org> writes:

[#248] Re: [PATCH] object.c ruby.h (fwd) — nobu.nokada@... 2002/07/25

Hi,

[#249] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/25

nobu.nokada@softhome.net writes:

[#250] Re: [PATCH] object.c ruby.h (fwd) — nobu.nokada@... 2002/07/25

Hi,

[#252] Re: [PATCH] object.c ruby.h (fwd) — GOTO Kentaro <gotoken@...> 2002/07/25

At Fri, 26 Jul 2002 03:11:02 +0900,

[#253] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/25

GOTO Kentaro <gotoken@notwork.org> writes:

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

From: "NAKAMURA, Hiroshi" <nahi@...>
Date: 2002-07-26 01:16:32 UTC
List: ruby-core #258
Hi,

> From: Dave Thomas
> Sent: Thursday, July 25, 2002 10:21 PM

> > > I'd expect to be able to test it with an assert(), but currently I
> > > can't without writing extra (and distracting) stuff.
> > 
> > Indeed assert() of Test::Unit::Assertions does not test 
> true/false.  
> > I think that the assert() is too generic and that can blur 
> the meaning
> > of an assertion.  Perhaps true-false-test may prevent abuse of
> > assert() in rubyunit.
> 
> Hmm - I differ here. I'd expect assert() to work the same way as 'if'
> and 'unless' do, so that
> 
>     assert(x)
> 
> would succeed and fail the same as
> 
>     raise "assertion failed" unless x

+1 to gotoken.  assert is for tester.  When someone put on
tester's hat, (s)he should assert to check true/false
explicitly, I think.

Back to the main topic about introducing Boolean class,
I don't have any idea because I seldom use TrueClass and
FalseClass with Ruby...  Does Ruby/C API user use TrueClass
/FalseClass instead of true/false(instances)?

How about introducing Boolean and aliasing TrueClass and
FalseClass to Boolean?

Regards,
// NaHi

In This Thread