From: GOTO Kentaro Date: 2002-07-25T20:06:17+09:00 Subject: Re: [PATCH] object.c ruby.h (fwd) At Thu, 25 Jul 2002 05:05:46 +0900, Dave Thomas wrote: > 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. > At the same time, I'm wondering if it would be possible to unify nil > and false, so that they were both the same object? Something built-in to get truth value of each object may help explain the boolean aspect in Ruby. % ruby -e ' module Kernel def truth() !!self end end p nil.truth p false.truth p :else.truth ' false false true -- Gotoken