David Alan Black wrote:

>Hello --
>
>On Mon, 18 Feb 2002, David Corbin wrote:
>
>>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:
>>>>
>>><snip>
>>>
>>>>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...)
>>
>
>OK, now that I know the specifics, I can provide a nicer way to do
>it :-)
>
>  def test_regex
>    assert_match(/a/, "a")
>    assert_not_match(/a/, "b")
>  end
>
Thanks.  But the rest of thread was still a good education....

>
>David
>