From: David Corbin Date: 2002-02-18T20:33:50+09:00 Subject: Re: x =~ /pat/, "return type?" Alexander Schofield wrote: >That sounds like your best bet, basically anything not nil or not false >is true. It can make for shorter code while allowing for a return value >to have a double meaning-- if it is true, not only return a true value, >but something that may be useful. > >David Alan Black wrote: > >>On Mon, 18 Feb 2002, David Corbin wrote: >> > > >>Or could you get your class to recognize more general true/false >>equivalences? Or is there some nicer/shorter way to do it >>I'm not thinking of? :-) >> > Thanks to everyone for the various suggestions. The code I'm calling is assert() in RubyUnit, so I'm not going to be able to change the libary. (Well, I could, I suppose, but there are lots of reasons not too...)