From: Robert Klemme Date: 2004-02-20T22:49:52+09:00 Subject: Re: proposal: let kind_of take more arguments "Gavin Kistner" schrieb im Newsbeitrag news:3boZb.87208$uV3.550379@attbi_s51... > nobu.nokada@softhome.net wrote: > > unless [Zero, One].any? {|klass| choice.kind_of?(klass)} > > > > Or shorter > > > > unless [Zero, One].any?(&choice.method(:kind_of?) > > Or, as I noted on the RCR: > > unless ([Zero,One] & choice.class.ancestors).length>0 if ([Zero,One] & choice.class.ancestors).empty? :-)) > > -- > (-, /\ \/ / /\/