"Gavin Kistner" <gavin / refinery.com> 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? :-)) > > -- > (-, /\ \/ / /\/