From: Patrick Li Date: 2008-08-16T02:53:00+09:00 Subject: Re: Ruby: Boolean Challenge heh... this will work... but i wouldn't suggest using it for anything other than intellectual enjoyment. class FalseOddRecognizer < NilClass //#same methods as TrueOddRecognizer end class TrueOddRecognizer //#same methods as before end Now, in knows(), return a FalseOddRecognizer when false and a TrueOddRecognizer on true. The trick is that Ruby evaluates all subclasses of NilClass to false. -- Posted via http://www.ruby-forum.com/.